linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Mukesh Ojha <mojha@codeaurora.org>
To: Qian Cai <cai@lca.pw>,
	mpe@ellerman.id.au, benh@kernel.crashing.org, paulus@samba.org
Cc: linuxppc-dev@lists.ozlabs.org, oohall@gmail.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] powerpc/pseries/pmem: fix a set but not used value
Date: Sun, 7 Apr 2019 11:47:10 +0530	[thread overview]
Message-ID: <c4b9aff8-ea32-0adb-f1c0-ea418643f442@codeaurora.org> (raw)
In-Reply-To: <20190407015447.39292-1-cai@lca.pw>


On 4/7/2019 7:24 AM, Qian Cai wrote:
> The commit 4c5d87db4978 ("powerpc/pseries: PAPR persistent memory
> support") set a local variable "count" in dlpar_hp_pmem() but never
> use it.
>
> arch/powerpc/platforms/pseries/pmem.c: In function 'dlpar_hp_pmem':
> arch/powerpc/platforms/pseries/pmem.c:109:6: warning: variable 'count'
> set but not used [-Wunused-but-set-variable]
>
> Signed-off-by: Qian Cai <cai@lca.pw>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>

Cheers,
-Mukesh
> ---
>   arch/powerpc/platforms/pseries/pmem.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/platforms/pseries/pmem.c b/arch/powerpc/platforms/pseries/pmem.c
> index 27f0a915c8a9..f860a897a9e0 100644
> --- a/arch/powerpc/platforms/pseries/pmem.c
> +++ b/arch/powerpc/platforms/pseries/pmem.c
> @@ -106,7 +106,7 @@ static ssize_t pmem_drc_remove_node(u32 drc_index)
>   
>   int dlpar_hp_pmem(struct pseries_hp_errorlog *hp_elog)
>   {
> -	u32 count, drc_index;
> +	u32 drc_index;
>   	int rc;
>   
>   	/* slim chance, but we might get a hotplug event while booting */
> @@ -123,7 +123,6 @@ int dlpar_hp_pmem(struct pseries_hp_errorlog *hp_elog)
>   		return -EINVAL;
>   	}
>   
> -	count = hp_elog->_drc_u.drc_count;
>   	drc_index = hp_elog->_drc_u.drc_index;
>   
>   	lock_device_hotplug();

  reply	other threads:[~2019-04-07  6:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-07  1:54 [PATCH] powerpc/pseries/pmem: fix a set but not used value Qian Cai
2019-04-07  6:17 ` Mukesh Ojha [this message]
2019-04-21 14:19 ` 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=c4b9aff8-ea32-0adb-f1c0-ea418643f442@codeaurora.org \
    --to=mojha@codeaurora.org \
    --cc=benh@kernel.crashing.org \
    --cc=cai@lca.pw \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=oohall@gmail.com \
    --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).