Resolve shadow warnings that are produced in W=2 builds by renaming a
global with a too-generic name and renaming a formal parameter.
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
} state, next_state;
static __initdata char *victim;
} state, next_state;
static __initdata char *victim;
-static unsigned long count __initdata;
+static unsigned long byte_count __initdata;
static __initdata loff_t this_header, next_header;
static inline void __init eat(unsigned n)
{
victim += n;
this_header += n;
static __initdata loff_t this_header, next_header;
static inline void __init eat(unsigned n)
{
victim += n;
this_header += n;
}
static __initdata char *vcollected;
}
static __initdata char *vcollected;
static void __init read_into(char *buf, unsigned size, enum state next)
{
static void __init read_into(char *buf, unsigned size, enum state next)
{
+ if (byte_count >= size) {
collected = victim;
eat(size);
state = next;
collected = victim;
eat(size);
state = next;
static int __init do_collect(void)
{
unsigned long n = remains;
static int __init do_collect(void)
{
unsigned long n = remains;
- if (count < n)
- n = count;
+ if (byte_count < n)
+ n = byte_count;
memcpy(collect, victim, n);
eat(n);
collect += n;
memcpy(collect, victim, n);
eat(n);
collect += n;
static int __init do_skip(void)
{
static int __init do_skip(void)
{
- if (this_header + count < next_header) {
- eat(count);
+ if (this_header + byte_count < next_header) {
+ eat(byte_count);
return 1;
} else {
eat(next_header - this_header);
return 1;
} else {
eat(next_header - this_header);
static int __init do_reset(void)
{
static int __init do_reset(void)
{
- while(count && *victim == '\0')
+ while (byte_count && *victim == '\0')
- if (count && (this_header & 3))
+ if (byte_count && (this_header & 3))
error("broken padding");
return 1;
}
error("broken padding");
return 1;
}
-static void __init clean_path(char *path, umode_t mode)
+static void __init clean_path(char *path, umode_t fmode)
- if (!sys_newlstat(path, &st) && (st.st_mode^mode) & S_IFMT) {
+ if (!sys_newlstat(path, &st) && (st.st_mode ^ fmode) & S_IFMT) {
if (S_ISDIR(st.st_mode))
sys_rmdir(path);
else
if (S_ISDIR(st.st_mode))
sys_rmdir(path);
else
static int __init do_copy(void)
{
static int __init do_copy(void)
{
- if (count >= body_len) {
+ if (byte_count >= body_len) {
if (xwrite(wfd, victim, body_len) != body_len)
error("write error");
sys_close(wfd);
if (xwrite(wfd, victim, body_len) != body_len)
error("write error");
sys_close(wfd);
state = SkipIt;
return 0;
} else {
state = SkipIt;
return 0;
} else {
- if (xwrite(wfd, victim, count) != count)
+ if (xwrite(wfd, victim, byte_count) != byte_count)
- body_len -= count;
- eat(count);
+ body_len -= byte_count;
+ eat(byte_count);
static long __init write_buffer(char *buf, unsigned long len)
{
static long __init write_buffer(char *buf, unsigned long len)
{
victim = buf;
while (!actions[state]())
;
victim = buf;
while (!actions[state]())
;
+ return len - byte_count;
}
static long __init flush_buffer(void *bufv, unsigned long len)
}
static long __init flush_buffer(void *bufv, unsigned long len)