* [PATCH -next] powerpc/powernv/sriov: Remove unused but set variable 'phb'
@ 2020-07-27 17:11 Wei Yongjun
2020-07-27 23:58 ` Oliver O'Halloran
2020-07-30 12:50 ` Michael Ellerman
0 siblings, 2 replies; 3+ messages in thread
From: Wei Yongjun @ 2020-07-27 17:11 UTC (permalink / raw)
To: Hulk Robot, Michael Ellerman, Oliver O'Halloran,
Alexey Kardashevskiy
Cc: linuxppc-dev, Wei Yongjun, linux-kernel
Gcc report warning as follows:
arch/powerpc/platforms/powernv/pci-sriov.c:602:25: warning:
variable 'phb' set but not used [-Wunused-but-set-variable]
602 | struct pnv_phb *phb;
| ^~~
This variable is not used, so this commit removing it.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
arch/powerpc/platforms/powernv/pci-sriov.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/powerpc/platforms/powernv/pci-sriov.c b/arch/powerpc/platforms/powernv/pci-sriov.c
index 8404d8c3901d..7894745fd4f8 100644
--- a/arch/powerpc/platforms/powernv/pci-sriov.c
+++ b/arch/powerpc/platforms/powernv/pci-sriov.c
@@ -599,10 +599,8 @@ static int pnv_pci_vf_resource_shift(struct pci_dev *dev, int offset)
static void pnv_pci_sriov_disable(struct pci_dev *pdev)
{
u16 num_vfs, base_pe;
- struct pnv_phb *phb;
struct pnv_iov_data *iov;
- phb = pci_bus_to_pnvhb(pdev->bus);
iov = pnv_iov_get(pdev);
num_vfs = iov->num_vfs;
base_pe = iov->vf_pe_arr[0].pe_number;
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] powerpc/powernv/sriov: Remove unused but set variable 'phb'
2020-07-27 17:11 [PATCH -next] powerpc/powernv/sriov: Remove unused but set variable 'phb' Wei Yongjun
@ 2020-07-27 23:58 ` Oliver O'Halloran
2020-07-30 12:50 ` Michael Ellerman
1 sibling, 0 replies; 3+ messages in thread
From: Oliver O'Halloran @ 2020-07-27 23:58 UTC (permalink / raw)
To: Wei Yongjun
Cc: Alexey Kardashevskiy, Hulk Robot, linuxppc-dev,
Linux Kernel Mailing List
On Tue, Jul 28, 2020 at 3:01 AM Wei Yongjun <weiyongjun1@huawei.com> wrote:
>
> Gcc report warning as follows:
>
> arch/powerpc/platforms/powernv/pci-sriov.c:602:25: warning:
> variable 'phb' set but not used [-Wunused-but-set-variable]
> 602 | struct pnv_phb *phb;
> | ^~~
>
> This variable is not used, so this commit removing it.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
> arch/powerpc/platforms/powernv/pci-sriov.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/arch/powerpc/platforms/powernv/pci-sriov.c b/arch/powerpc/platforms/powernv/pci-sriov.c
> index 8404d8c3901d..7894745fd4f8 100644
> --- a/arch/powerpc/platforms/powernv/pci-sriov.c
> +++ b/arch/powerpc/platforms/powernv/pci-sriov.c
> @@ -599,10 +599,8 @@ static int pnv_pci_vf_resource_shift(struct pci_dev *dev, int offset)
> static void pnv_pci_sriov_disable(struct pci_dev *pdev)
> {
> u16 num_vfs, base_pe;
> - struct pnv_phb *phb;
> struct pnv_iov_data *iov;
>
> - phb = pci_bus_to_pnvhb(pdev->bus);
> iov = pnv_iov_get(pdev);
> num_vfs = iov->num_vfs;
> base_pe = iov->vf_pe_arr[0].pe_number;
>
Acked-by: Oliver O'Halloran <oohall@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] powerpc/powernv/sriov: Remove unused but set variable 'phb'
2020-07-27 17:11 [PATCH -next] powerpc/powernv/sriov: Remove unused but set variable 'phb' Wei Yongjun
2020-07-27 23:58 ` Oliver O'Halloran
@ 2020-07-30 12:50 ` Michael Ellerman
1 sibling, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2020-07-30 12:50 UTC (permalink / raw)
To: Alexey Kardashevskiy, Wei Yongjun, Hulk Robot, Michael Ellerman,
Oliver O'Halloran
Cc: linuxppc-dev, linux-kernel
On Tue, 28 Jul 2020 01:11:12 +0800, Wei Yongjun wrote:
> Gcc report warning as follows:
>
> arch/powerpc/platforms/powernv/pci-sriov.c:602:25: warning:
> variable 'phb' set but not used [-Wunused-but-set-variable]
> 602 | struct pnv_phb *phb;
> | ^~~
>
> [...]
Applied to powerpc/next.
[1/1] powerpc/powernv/sriov: Remove unused but set variable 'phb'
https://git.kernel.org/powerpc/c/cf1ae052e073c7ef6cf1a783a6427f7228253bd3
cheers
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-07-30 13:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-27 17:11 [PATCH -next] powerpc/powernv/sriov: Remove unused but set variable 'phb' Wei Yongjun
2020-07-27 23:58 ` Oliver O'Halloran
2020-07-30 12:50 ` Michael Ellerman
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).