linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: "Cédric Le Goater" <clg@kaod.org>,
	"Michael Ellerman" <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org, Oliver O'Halloran <oohall@gmail.com>
Subject: Re: [PATCH 5/7] powerpc/powernv/pci: Fix W=1 compile warning
Date: Fri, 11 Sep 2020 07:41:20 +0200	[thread overview]
Message-ID: <d930f5b2-6e0e-311d-0889-bf952d6af8c6@csgroup.eu> (raw)
In-Reply-To: <20200910210250.1962595-6-clg@kaod.org>



Le 10/09/2020 à 23:02, Cédric Le Goater a écrit :
>    CC      arch/powerpc/platforms/powernv/pci-ioda.o
> ../arch/powerpc/platforms/powernv/pci-ioda.c: In function ‘pnv_ioda_configure_pe’:
> ../arch/powerpc/platforms/powernv/pci-ioda.c:897:18: error: variable ‘parent’ set but not used [-Werror=unused-but-set-variable]
>    struct pci_dev *parent;
>                    ^~~~~~
> 

A small sentence explaining how this is fixed would be welcome, so that 
you don't need to read the code the know what the commit does to fix the 
warning. Also the subject should be more explicit.


> Cc: Oliver O'Halloran <oohall@gmail.com>
> Signed-off-by: Cédric Le Goater <clg@kaod.org>

Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>

> ---
>   arch/powerpc/platforms/powernv/pci-ioda.c | 8 --------
>   1 file changed, 8 deletions(-)
> 
> diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c
> index 023a4f987bb2..2b4ceb5e6ce4 100644
> --- a/arch/powerpc/platforms/powernv/pci-ioda.c
> +++ b/arch/powerpc/platforms/powernv/pci-ioda.c
> @@ -894,7 +894,6 @@ int pnv_ioda_deconfigure_pe(struct pnv_phb *phb, struct pnv_ioda_pe *pe)
>   
>   int pnv_ioda_configure_pe(struct pnv_phb *phb, struct pnv_ioda_pe *pe)
>   {
> -	struct pci_dev *parent;
>   	uint8_t bcomp, dcomp, fcomp;
>   	long rc, rid_end, rid;
>   
> @@ -904,7 +903,6 @@ int pnv_ioda_configure_pe(struct pnv_phb *phb, struct pnv_ioda_pe *pe)
>   
>   		dcomp = OPAL_IGNORE_RID_DEVICE_NUMBER;
>   		fcomp = OPAL_IGNORE_RID_FUNCTION_NUMBER;
> -		parent = pe->pbus->self;
>   		if (pe->flags & PNV_IODA_PE_BUS_ALL)
>   			count = resource_size(&pe->pbus->busn_res);
>   		else
> @@ -925,12 +923,6 @@ int pnv_ioda_configure_pe(struct pnv_phb *phb, struct pnv_ioda_pe *pe)
>   		}
>   		rid_end = pe->rid + (count << 8);
>   	} else {
> -#ifdef CONFIG_PCI_IOV
> -		if (pe->flags & PNV_IODA_PE_VF)
> -			parent = pe->parent_dev;
> -		else
> -#endif /* CONFIG_PCI_IOV */
> -			parent = pe->pdev->bus->self;
>   		bcomp = OpalPciBusAll;
>   		dcomp = OPAL_COMPARE_RID_DEVICE_NUMBER;
>   		fcomp = OPAL_COMPARE_RID_FUNCTION_NUMBER;
> 

  reply	other threads:[~2020-09-11  5:44 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-10 21:02 [PATCH 0/7] powerpc: Fix a few W=1 compile warnings Cédric Le Goater
2020-09-10 21:02 ` [PATCH 1/7] powerpc/sysfs: Fix W=1 compile warning Cédric Le Goater
2020-09-11  5:26   ` Christophe Leroy
2020-09-11  9:10     ` Cédric Le Goater
2020-09-10 21:02 ` [PATCH 2/7] powerpc/prom: " Cédric Le Goater
2020-09-11  5:33   ` Christophe Leroy
2020-09-11  6:01     ` Cédric Le Goater
2020-09-10 21:02 ` [PATCH 3/7] powerpc/sstep: " Cédric Le Goater
2020-09-11  5:38   ` Christophe Leroy
2020-09-11  5:59     ` Cédric Le Goater
2020-09-11  6:04       ` Christophe Leroy
2020-09-10 21:02 ` [PATCH 4/7] powerpc/xive: " Cédric Le Goater
2020-09-11  5:40   ` Christophe Leroy
2020-09-10 21:02 ` [PATCH 5/7] powerpc/powernv/pci: " Cédric Le Goater
2020-09-11  5:41   ` Christophe Leroy [this message]
2020-09-11  6:32   ` Oliver O'Halloran
2020-09-10 21:02 ` [PATCH 6/7] powerpc/perf: " Cédric Le Goater
2020-09-11  5:42   ` Christophe Leroy
2020-09-10 21:02 ` [PATCH 7/7] powerpc/32: " Cédric Le Goater
2020-09-11  5:49   ` Christophe Leroy

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=d930f5b2-6e0e-311d-0889-bf952d6af8c6@csgroup.eu \
    --to=christophe.leroy@csgroup.eu \
    --cc=clg@kaod.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=oohall@gmail.com \
    /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).