linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: zhengbin <zhengbin13@huawei.com>
To: <benh@kernel.crashing.org>, <paulus@samba.org>,
	<mpe@ellerman.id.au>, <linuxppc-dev@lists.ozlabs.org>
Cc: zhengbin13@huawei.com
Subject: [PATCH 1/5] powerpc/fadump: Remove set but not used variable 'elf'
Date: Tue, 19 Nov 2019 14:14:30 +0800	[thread overview]
Message-ID: <1574144074-142032-2-git-send-email-zhengbin13@huawei.com> (raw)
In-Reply-To: <1574144074-142032-1-git-send-email-zhengbin13@huawei.com>

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

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. */
--
2.7.4


  reply	other threads:[~2019-11-19  7:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-19  6:14 [PATCH 0/5] powerpc: Remove five unused variables zhengbin
2019-11-19  6:14 ` zhengbin [this message]
2019-11-19  6:14 ` [PATCH 2/5] powerpc/perf: Remove set but not used variable 'target' zhengbin
2019-11-19  6:14 ` [PATCH 3/5] powerpc/powernv: Remove set but not used variable 'total_vfs' zhengbin
2019-11-19  6:14 ` [PATCH 4/5] powerpc/powernv: Remove set but not used variable 'pdn' zhengbin
2019-11-19  6:14 ` [PATCH 5/5] powerpc/powernv: Remove set but not used variable 'parent' zhengbin
2020-09-09 13:37 ` [PATCH 0/5] powerpc: Remove five unused variables Michael Ellerman

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=1574144074-142032-2-git-send-email-zhengbin13@huawei.com \
    --to=zhengbin13@huawei.com \
    --cc=benh@kernel.crashing.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.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;
as well as URLs for NNTP newsgroup(s).