From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org
Cc: Mark Rustad <mark.d.rustad@intel.com>,
linux-kernel@vger.kernel.org,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [PATCH 2/2] x86: Resolve some shadow warnings
Date: Fri, 25 Jul 2014 07:43:17 -0700 [thread overview]
Message-ID: <1406299397-30077-2-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1406299397-30077-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Mark Rustad <mark.d.rustad@intel.com>
Resolve some shadow warnings and also eliminate some hazards
for possible name clashes on local variables declared in inner
blocks produced by those macros. Passing an outer variable with
the same name as an inner variable would cause serious confusion,
so prepend the inner variables with underscores to reduce the
exposure.
Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
arch/x86/ia32/ia32_signal.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/arch/x86/ia32/ia32_signal.c b/arch/x86/ia32/ia32_signal.c
index f9e181a..11e4987 100644
--- a/arch/x86/ia32/ia32_signal.c
+++ b/arch/x86/ia32/ia32_signal.c
@@ -135,7 +135,7 @@ int copy_siginfo_from_user32(siginfo_t *to, compat_siginfo_t __user *from)
#define loadsegment_ds(v) loadsegment(ds, v)
#define loadsegment_es(v) loadsegment(es, v)
-#define get_user_seg(seg) ({ unsigned int v; savesegment(seg, v); v; })
+#define get_user_seg(seg) ({ unsigned int _v; savesegment(seg, _v); _v; })
#define set_user_seg(seg, v) loadsegment_##seg(v)
#define COPY(x) { \
@@ -143,9 +143,9 @@ int copy_siginfo_from_user32(siginfo_t *to, compat_siginfo_t __user *from)
}
#define GET_SEG(seg) ({ \
- unsigned short tmp; \
- get_user_ex(tmp, &sc->seg); \
- tmp; \
+ unsigned short _tmp; \
+ get_user_ex(_tmp, &sc->seg); \
+ _tmp; \
})
#define COPY_SEG_CPL3(seg) do { \
@@ -153,11 +153,11 @@ int copy_siginfo_from_user32(siginfo_t *to, compat_siginfo_t __user *from)
} while (0)
#define RELOAD_SEG(seg) { \
- unsigned int pre = GET_SEG(seg); \
- unsigned int cur = get_user_seg(seg); \
- pre |= 3; \
- if (pre != cur) \
- set_user_seg(seg, pre); \
+ unsigned int _pre = GET_SEG(seg); \
+ unsigned int _cur = get_user_seg(seg); \
+ _pre |= 3; \
+ if (_pre != _cur) \
+ set_user_seg(seg, _pre); \
}
static int ia32_restore_sigcontext(struct pt_regs *regs,
--
1.9.3
prev parent reply other threads:[~2014-07-25 14:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-25 14:43 [PATCH 1/2] x86: Resolve shadow warnings from apic_io.h Jeff Kirsher
2014-07-25 14:43 ` Jeff Kirsher [this message]
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=1406299397-30077-2-git-send-email-jeffrey.t.kirsher@intel.com \
--to=jeffrey.t.kirsher@intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.d.rustad@intel.com \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.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
all inboxes | Powered by JetHome®