LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [Patch] Fix shadowed variables in fs/binfmt_elf.c
@ 2008-02-15 13:58 WANG Cong
  2008-02-15 20:34 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: WANG Cong @ 2008-02-15 13:58 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: Andrew Morton


Fix these sparse warings:
fs/binfmt_elf.c:1749:29: warning: symbol 'tmp' shadows an earlier one
fs/binfmt_elf.c:1734:28: originally declared here
fs/binfmt_elf.c:2009:26: warning: symbol 'vma' shadows an earlier one
fs/binfmt_elf.c:1892:24: originally declared here

Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>

---
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 41a958a..6562563 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -1746,11 +1746,11 @@ static int fill_note_info(struct elfhdr *elf, int phdrs,
 		while_each_thread(g, p);
 		rcu_read_unlock();
 		list_for_each(t, &info->thread_list) {
-			struct elf_thread_status *tmp;
+			struct elf_thread_status *temp;
 			int sz;
 
-			tmp = list_entry(t, struct elf_thread_status, list);
-			sz = elf_dump_thread_status(signr, tmp);
+			temp = list_entry(t, struct elf_thread_status, list);
+			sz = elf_dump_thread_status(signr, temp);
 			info->thread_status_size += sz;
 		}
 	}
@@ -2006,10 +2006,10 @@ static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file, un
 
 		for (addr = vma->vm_start; addr < end; addr += PAGE_SIZE) {
 			struct page *page;
-			struct vm_area_struct *vma;
+			struct vm_area_struct *tmp_vma;
 
 			if (get_user_pages(current, current->mm, addr, 1, 0, 1,
-						&page, &vma) <= 0) {
+						&page, &tmp_vma) <= 0) {
 				DUMP_SEEK(PAGE_SIZE);
 			} else {
 				if (page == ZERO_PAGE(0)) {
@@ -2019,7 +2019,7 @@ static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file, un
 					}
 				} else {
 					void *kaddr;
-					flush_cache_page(vma, addr,
+					flush_cache_page(tmp_vma, addr,
 							 page_to_pfn(page));
 					kaddr = kmap(page);
 					if ((size += PAGE_SIZE) > limit ||

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-02-16  8:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-15 13:58 [Patch] Fix shadowed variables in fs/binfmt_elf.c WANG Cong
2008-02-15 20:34 ` Andrew Morton
2008-02-16  8:50   ` WANG Cong

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).