From: Scott Wood <scottwood@freescale.com>
To: paulus@samba.org
Cc: linuxppc-dev@ozlabs.org, david@gibson.dropbear.id.au
Subject: [PATCH 1/2] wrapper: rename offset in offset_devp().
Date: Tue, 11 Dec 2007 15:23:04 -0600 [thread overview]
Message-ID: <20071211212303.GA3661@loki.buserror.net> (raw)
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 <scottwood@freescale.com>
---
arch/powerpc/boot/libfdt-wrapper.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/boot/libfdt-wrapper.c b/arch/powerpc/boot/libfdt-wrapper.c
index 002da16..868c504 100644
--- a/arch/powerpc/boot/libfdt-wrapper.c
+++ b/arch/powerpc/boot/libfdt-wrapper.c
@@ -44,8 +44,8 @@
#define offset_devp(off) \
({ \
- int offset = (off); \
- check_err(offset) ? NULL : (void *)(offset+1); \
+ int _offset = (off); \
+ check_err(_offset) ? NULL : (void *)(_offset+1); \
})
#define devp_offset(devp) (((int)(devp))-1)
--
1.5.3.7
next reply other threads:[~2007-12-11 21:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-11 21:23 Scott Wood [this message]
2007-12-12 4:45 ` [PATCH 1/2] wrapper: rename offset in offset_devp() Stephen Rothwell
2007-12-17 0:44 ` David Gibson
2007-12-17 0:40 ` David Gibson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071211212303.GA3661@loki.buserror.net \
--to=scottwood@freescale.com \
--cc=david@gibson.dropbear.id.au \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).