From: Qian Cai <cai@lca.pw>
To: benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au,
Christoph Hellwig <hch@lst.de>
Cc: aik@ozlabs.ru, linuxppc-dev@lists.ozlabs.org,
linux-kernel@vger.kernel.org,
Alexey Kardashevskiy <aik@ozlabs.ru>
Subject: Re: [PATCH] powerpc/powernv: fix a W=1 compilation warning
Date: Tue, 03 Sep 2019 09:29:14 -0400 [thread overview]
Message-ID: <1567517354.5576.45.camel@lca.pw> (raw)
In-Reply-To: <1558541369-8263-1-git-send-email-cai@lca.pw>
I saw Christ start to remove npu-dma.c code [1]
[1] https://lore.kernel.org/linuxppc-dev/20190625145239.2759-4-hch@lst.de/
Should pnv_npu_dma_set_32() be removed too?
It was only called by pnv_npu_try_dma_set_bypass() but the later is not used
anywhere in the kernel tree. If that is a case, I don't need to bother fixing
the warning here.
On Wed, 2019-05-22 at 12:09 -0400, Qian Cai wrote:
> The commit b575c731fe58 ("powerpc/powernv/npu: Add set/unset window
> helpers") called pnv_npu_set_window() in a void function
> pnv_npu_dma_set_32(), but the return code from pnv_npu_set_window() has
> no use there as all the error logging happen in pnv_npu_set_window(),
> so just remove the unused variable to avoid a compilation warning,
>
> arch/powerpc/platforms/powernv/npu-dma.c: In function
> 'pnv_npu_dma_set_32':
> arch/powerpc/platforms/powernv/npu-dma.c:198:10: warning: variable ‘rc’
> set but not used [-Wunused-but-set-variable]
>
> Signed-off-by: Qian Cai <cai@lca.pw>
> ---
> arch/powerpc/platforms/powernv/npu-dma.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/arch/powerpc/platforms/powernv/npu-dma.c
> b/arch/powerpc/platforms/powernv/npu-dma.c
> index 495550432f3d..035208ed591f 100644
> --- a/arch/powerpc/platforms/powernv/npu-dma.c
> +++ b/arch/powerpc/platforms/powernv/npu-dma.c
> @@ -195,7 +195,6 @@ static void pnv_npu_dma_set_32(struct pnv_ioda_pe *npe)
> {
> struct pci_dev *gpdev;
> struct pnv_ioda_pe *gpe;
> - int64_t rc;
>
> /*
> * Find the assoicated PCI devices and get the dma window
> @@ -208,8 +207,8 @@ static void pnv_npu_dma_set_32(struct pnv_ioda_pe *npe)
> if (!gpe)
> return;
>
> - rc = pnv_npu_set_window(&npe->table_group, 0,
> - gpe->table_group.tables[0]);
> + pnv_npu_set_window(&npe->table_group, 0,
> + gpe->table_group.tables[0]);
>
> /*
> * NVLink devices use the same TCE table configuration as
next prev parent reply other threads:[~2019-09-03 13:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-22 16:09 [PATCH] powerpc/powernv: fix a W=1 compilation warning Qian Cai
2019-07-12 15:29 ` Qian Cai
2019-09-03 13:29 ` Qian Cai [this message]
2019-09-03 13:30 ` Christoph Hellwig
2019-09-03 13:52 ` Qian Cai
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=1567517354.5576.45.camel@lca.pw \
--to=cai@lca.pw \
--cc=aik@ozlabs.ru \
--cc=benh@kernel.crashing.org \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.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).