* [PATCH] PCI: altera: remove unused num_of_vectors variable
@ 2017-07-12 9:51 Shawn Lin
2017-07-13 3:30 ` Bjorn Helgaas
0 siblings, 1 reply; 2+ messages in thread
From: Shawn Lin @ 2017-07-12 9:51 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: linux-pci, Shawn Lin, Ley Foon Tan
It was never used and could be removed, otherwise
we could see a warning:
drivers/pci/host/pcie-altera-msi.c: In function 'altera_msi_isr':
drivers/pci/host/pcie-altera-msi.c:67:6: warning: variable
'num_of_vectors' set but not used [-Wunused-but-set-variable]
Cc: Ley Foon Tan <lftan@altera.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
---
drivers/pci/host/pcie-altera-msi.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/pci/host/pcie-altera-msi.c b/drivers/pci/host/pcie-altera-msi.c
index 4e5d628..2864030 100644
--- a/drivers/pci/host/pcie-altera-msi.c
+++ b/drivers/pci/host/pcie-altera-msi.c
@@ -64,13 +64,11 @@ static void altera_msi_isr(struct irq_desc *desc)
struct irq_chip *chip = irq_desc_get_chip(desc);
struct altera_msi *msi;
unsigned long status;
- u32 num_of_vectors;
u32 bit;
u32 virq;
chained_irq_enter(chip, desc);
msi = irq_desc_get_handler_data(desc);
- num_of_vectors = msi->num_of_vectors;
while ((status = msi_readl(msi, MSI_STATUS)) != 0) {
for_each_set_bit(bit, &status, msi->num_of_vectors) {
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] PCI: altera: remove unused num_of_vectors variable
2017-07-12 9:51 [PATCH] PCI: altera: remove unused num_of_vectors variable Shawn Lin
@ 2017-07-13 3:30 ` Bjorn Helgaas
0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2017-07-13 3:30 UTC (permalink / raw)
To: Shawn Lin; +Cc: Bjorn Helgaas, linux-pci, Ley Foon Tan
On Wed, Jul 12, 2017 at 05:51:16PM +0800, Shawn Lin wrote:
> It was never used and could be removed, otherwise
> we could see a warning:
>
> drivers/pci/host/pcie-altera-msi.c: In function 'altera_msi_isr':
> drivers/pci/host/pcie-altera-msi.c:67:6: warning: variable
> 'num_of_vectors' set but not used [-Wunused-but-set-variable]
>
> Cc: Ley Foon Tan <lftan@altera.com>
> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Applied to pci/host-altera for v4.14, thanks!
> ---
>
> drivers/pci/host/pcie-altera-msi.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/pci/host/pcie-altera-msi.c b/drivers/pci/host/pcie-altera-msi.c
> index 4e5d628..2864030 100644
> --- a/drivers/pci/host/pcie-altera-msi.c
> +++ b/drivers/pci/host/pcie-altera-msi.c
> @@ -64,13 +64,11 @@ static void altera_msi_isr(struct irq_desc *desc)
> struct irq_chip *chip = irq_desc_get_chip(desc);
> struct altera_msi *msi;
> unsigned long status;
> - u32 num_of_vectors;
> u32 bit;
> u32 virq;
>
> chained_irq_enter(chip, desc);
> msi = irq_desc_get_handler_data(desc);
> - num_of_vectors = msi->num_of_vectors;
>
> while ((status = msi_readl(msi, MSI_STATUS)) != 0) {
> for_each_set_bit(bit, &status, msi->num_of_vectors) {
> --
> 1.9.1
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-07-13 3:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-12 9:51 [PATCH] PCI: altera: remove unused num_of_vectors variable Shawn Lin
2017-07-13 3:30 ` Bjorn Helgaas
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).