Re: [PATCH 1/2] wrapper: rename offset in offset_devp().

2007-12-16 Thread David Gibson
On Wed, Dec 12, 2007 at 03:45:28PM +1100, Stephen Rothwell wrote: > On Tue, 11 Dec 2007 15:23:04 -0600 Scott Wood <[EMAIL PROTECTED]> wrote: > > > > #define offset_devp(off) \ > > ({ \ > > - int offset = (off); \ > > - check_err(offset) ? NULL : (void *)(offset+1); \ > >

Re: [PATCH 1/2] wrapper: rename offset in offset_devp().

2007-12-16 Thread David Gibson
On Tue, Dec 11, 2007 at 03:23:04PM -0600, Scott Wood wrote: > fdt_wrapper_create_node passes a variable called offset to offset_devp(), > which uses said parameter to initialize a local variable called offset. > > Due to one of the odder aspects of the C language, the result is an > undefined vari

Re: [PATCH 1/2] wrapper: rename offset in offset_devp().

2007-12-11 Thread Stephen Rothwell
On Tue, 11 Dec 2007 15:23:04 -0600 Scott Wood <[EMAIL PROTECTED]> wrote: > > #define offset_devp(off) \ > ({ \ > - int offset = (off); \ > - check_err(offset) ? NULL : (void *)(offset+1); \ > + int _offset = (off); \ > + check_err(_offset)

[PATCH 1/2] wrapper: rename offset in offset_devp().

2007-12-11 Thread Scott Wood
fdt_wrapper_create_node passes a variable called offset to offset_devp(), which uses said parameter to initialize a local variable called offset. Due to one of the odder aspects of the C language, the result is an undefined variable, with no error or warning. Signed-off-by: Scott Wood <[EMAIL PRO