diff options
author | Mark Rustad <mark.d.rustad@intel.com> | 2014-10-13 18:54:07 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-13 20:18:22 -0400 |
commit | c34d85aca91729596f876604e147892b81ecbbe9 (patch) | |
tree | 16ebaa1b5eae5ab9cc8e3fd34b3ccb8a7b5dfe6a /init | |
parent | 906e36c5c717cc99e622350f533876feed9bffe0 (diff) |
init/initramfs.c: resolve shadow warnings
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>
Diffstat (limited to 'init')
-rw-r--r-- | init/initramfs.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/init/initramfs.c b/init/initramfs.c index bece48c3461e..ad1bd7787bbb 100644 --- a/init/initramfs.c +++ b/init/initramfs.c | |||
@@ -197,14 +197,14 @@ static __initdata enum state { | |||
197 | } state, next_state; | 197 | } state, next_state; |
198 | 198 | ||
199 | static __initdata char *victim; | 199 | static __initdata char *victim; |
200 | static unsigned long count __initdata; | 200 | static unsigned long byte_count __initdata; |
201 | static __initdata loff_t this_header, next_header; | 201 | static __initdata loff_t this_header, next_header; |
202 | 202 | ||
203 | static inline void __init eat(unsigned n) | 203 | static inline void __init eat(unsigned n) |
204 | { | 204 | { |
205 | victim += n; | 205 | victim += n; |
206 | this_header += n; | 206 | this_header += n; |
207 | count -= n; | 207 | byte_count -= n; |
208 | } | 208 | } |
209 | 209 | ||
210 | static __initdata char *vcollected; | 210 | static __initdata char *vcollected; |
@@ -214,7 +214,7 @@ static __initdata char *collect; | |||
214 | 214 | ||
215 | static void __init read_into(char *buf, unsigned size, enum state next) | 215 | static void __init read_into(char *buf, unsigned size, enum state next) |
216 | { | 216 | { |
217 | if (count >= size) { | 217 | if (byte_count >= size) { |
218 | collected = victim; | 218 | collected = victim; |
219 | eat(size); | 219 | eat(size); |
220 | state = next; | 220 | state = next; |
@@ -237,8 +237,8 @@ static int __init do_start(void) | |||
237 | static int __init do_collect(void) | 237 | static int __init do_collect(void) |
238 | { | 238 | { |
239 | unsigned long n = remains; | 239 | unsigned long n = remains; |
240 | if (count < n) | 240 | if (byte_count < n) |
241 | n = count; | 241 | n = byte_count; |
242 | memcpy(collect, victim, n); | 242 | memcpy(collect, victim, n); |
243 | eat(n); | 243 | eat(n); |
244 | collect += n; | 244 | collect += n; |
@@ -280,8 +280,8 @@ static int __init do_header(void) | |||
280 | 280 | ||
281 | static int __init do_skip(void) | 281 | static int __init do_skip(void) |
282 | { | 282 | { |
283 | if (this_header + count < next_header) { | 283 | if (this_header + byte_count < next_header) { |
284 | eat(count); | 284 | eat(byte_count); |
285 | return 1; | 285 | return 1; |
286 | } else { | 286 | } else { |
287 | eat(next_header - this_header); | 287 | eat(next_header - this_header); |
@@ -292,9 +292,9 @@ static int __init do_skip(void) | |||
292 | 292 | ||
293 | static int __init do_reset(void) | 293 | static int __init do_reset(void) |
294 | { | 294 | { |
295 | while(count && *victim == '\0') | 295 | while (byte_count && *victim == '\0') |
296 | eat(1); | 296 | eat(1); |
297 | if (count && (this_header & 3)) | 297 | if (byte_count && (this_header & 3)) |
298 | error("broken padding"); | 298 | error("broken padding"); |
299 | return 1; | 299 | return 1; |
300 | } | 300 | } |
@@ -309,11 +309,11 @@ static int __init maybe_link(void) | |||
309 | return 0; | 309 | return 0; |
310 | } | 310 | } |
311 | 311 | ||
312 | static void __init clean_path(char *path, umode_t mode) | 312 | static void __init clean_path(char *path, umode_t fmode) |
313 | { | 313 | { |
314 | struct stat st; | 314 | struct stat st; |
315 | 315 | ||
316 | if (!sys_newlstat(path, &st) && (st.st_mode^mode) & S_IFMT) { | 316 | if (!sys_newlstat(path, &st) && (st.st_mode ^ fmode) & S_IFMT) { |
317 | if (S_ISDIR(st.st_mode)) | 317 | if (S_ISDIR(st.st_mode)) |
318 | sys_rmdir(path); | 318 | sys_rmdir(path); |
319 | else | 319 | else |
@@ -368,7 +368,7 @@ static int __init do_name(void) | |||
368 | 368 | ||
369 | static int __init do_copy(void) | 369 | static int __init do_copy(void) |
370 | { | 370 | { |
371 | if (count >= body_len) { | 371 | if (byte_count >= body_len) { |
372 | if (xwrite(wfd, victim, body_len) != body_len) | 372 | if (xwrite(wfd, victim, body_len) != body_len) |
373 | error("write error"); | 373 | error("write error"); |
374 | sys_close(wfd); | 374 | sys_close(wfd); |
@@ -378,10 +378,10 @@ static int __init do_copy(void) | |||
378 | state = SkipIt; | 378 | state = SkipIt; |
379 | return 0; | 379 | return 0; |
380 | } else { | 380 | } else { |
381 | if (xwrite(wfd, victim, count) != count) | 381 | if (xwrite(wfd, victim, byte_count) != byte_count) |
382 | error("write error"); | 382 | error("write error"); |
383 | body_len -= count; | 383 | body_len -= byte_count; |
384 | eat(count); | 384 | eat(byte_count); |
385 | return 1; | 385 | return 1; |
386 | } | 386 | } |
387 | } | 387 | } |
@@ -411,12 +411,12 @@ static __initdata int (*actions[])(void) = { | |||
411 | 411 | ||
412 | static long __init write_buffer(char *buf, unsigned long len) | 412 | static long __init write_buffer(char *buf, unsigned long len) |
413 | { | 413 | { |
414 | count = len; | 414 | byte_count = len; |
415 | victim = buf; | 415 | victim = buf; |
416 | 416 | ||
417 | while (!actions[state]()) | 417 | while (!actions[state]()) |
418 | ; | 418 | ; |
419 | return len - count; | 419 | return len - byte_count; |
420 | } | 420 | } |
421 | 421 | ||
422 | static long __init flush_buffer(void *bufv, unsigned long len) | 422 | static long __init flush_buffer(void *bufv, unsigned long len) |