All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PCI: remove unused struct resource *res from pci_resource_io
@ 2017-07-06  9:00 Shawn Lin
  2017-07-10 21:11 ` Bjorn Helgaas
  0 siblings, 1 reply; 2+ messages in thread
From: Shawn Lin @ 2017-07-06  9:00 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: linux-pci, Shawn Lin

It is never used and introduces a compile warning:

drivers/pci/pci-sysfs.c: In function 'pci_resource_io':
drivers/pci/pci-sysfs.c:1214:19: warning: variable 'res' set but not
used [-Wunused-but-set-variable]

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
---

 drivers/pci/pci-sysfs.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
index 2f3780b..0e43705 100644
--- a/drivers/pci/pci-sysfs.c
+++ b/drivers/pci/pci-sysfs.c
@@ -1211,11 +1211,8 @@ static ssize_t pci_resource_io(struct file *filp, struct kobject *kobj,
 {
 	struct pci_dev *pdev = to_pci_dev(kobj_to_dev(kobj));
 	int bar = (unsigned long)attr->private;
-	struct resource *res;
 	unsigned long port = off;
 
-	res = &pdev->resource[bar];
-
 	port += pci_resource_start(pdev, bar);
 
 	if (port > pci_resource_end(pdev, bar))
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] PCI: remove unused struct resource *res from pci_resource_io
  2017-07-06  9:00 [PATCH] PCI: remove unused struct resource *res from pci_resource_io Shawn Lin
@ 2017-07-10 21:11 ` Bjorn Helgaas
  0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2017-07-10 21:11 UTC (permalink / raw)
  To: Shawn Lin; +Cc: Bjorn Helgaas, linux-pci

On Thu, Jul 06, 2017 at 05:00:20PM +0800, Shawn Lin wrote:
> It is never used and introduces a compile warning:
> 
> drivers/pci/pci-sysfs.c: In function 'pci_resource_io':
> drivers/pci/pci-sysfs.c:1214:19: warning: variable 'res' set but not
> used [-Wunused-but-set-variable]
> 
> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>

Applied to pci/trivial for v4.14, thanks!

> ---
> 
>  drivers/pci/pci-sysfs.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
> index 2f3780b..0e43705 100644
> --- a/drivers/pci/pci-sysfs.c
> +++ b/drivers/pci/pci-sysfs.c
> @@ -1211,11 +1211,8 @@ static ssize_t pci_resource_io(struct file *filp, struct kobject *kobj,
>  {
>  	struct pci_dev *pdev = to_pci_dev(kobj_to_dev(kobj));
>  	int bar = (unsigned long)attr->private;
> -	struct resource *res;
>  	unsigned long port = off;
>  
> -	res = &pdev->resource[bar];
> -
>  	port += pci_resource_start(pdev, bar);
>  
>  	if (port > pci_resource_end(pdev, bar))
> -- 
> 1.9.1
> 
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-07-10 21:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-06  9:00 [PATCH] PCI: remove unused struct resource *res from pci_resource_io Shawn Lin
2017-07-10 21:11 ` Bjorn Helgaas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.