diff mbox series

[1/5] powerpc/fadump: Remove set but not used variable 'elf'

Message ID 1574144074-142032-2-git-send-email-zhengbin13@huawei.com
State Accepted
Commit 738e6cad0ace88edec8f4ffa082749ad5df26409
Headers show
Series powerpc: Remove five unused variables | expand

Checks

Context Check Description
snowpatch_ozlabs/needsstable success Patch has no Fixes tags
snowpatch_ozlabs/checkpatch success total: 0 errors, 0 warnings, 0 checks, 10 lines checked
snowpatch_ozlabs/apply_patch success Successfully applied on branch powerpc/merge (784eee1cc44801366d4f197e0ade7739ee8e1e83)

Commit Message

Zheng Bin Nov. 19, 2019, 6:14 a.m. UTC
Fixes gcc '-Wunused-but-set-variable' warning:

arch/powerpc/kernel/fadump.c: In function fadump_update_elfcore_header:
arch/powerpc/kernel/fadump.c:790:17: warning: variable elf set but not used [-Wunused-but-set-variable]

It is introduced by commit ebaeb5ae2437 ("fadump:
Convert firmware-assisted cpu state dump data into elf notes."),
but never used, so remove it.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
 arch/powerpc/kernel/fadump.c | 2 --
 1 file changed, 2 deletions(-)

--
2.7.4
diff mbox series

Patch

diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
index ff0114a..66f6bf0 100644
--- a/arch/powerpc/kernel/fadump.c
+++ b/arch/powerpc/kernel/fadump.c
@@ -654,10 +654,8 @@  u32 *fadump_regs_to_elf_notes(u32 *buf, struct pt_regs *regs)

 void fadump_update_elfcore_header(char *bufp)
 {
-	struct elfhdr *elf;
 	struct elf_phdr *phdr;

-	elf = (struct elfhdr *)bufp;
 	bufp += sizeof(struct elfhdr);

 	/* First note is a place holder for cpu notes info. */