kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [yinghai:for-pci-pcie-link 104/104] drivers/pci/pcie-sysfs.c:27:25: sparse: symbol 'pcie_link_disabl
@ 2012-07-11  8:24 wfg
  2012-07-11  8:29 ` [yinghai:for-pci-pcie-link 104/104] drivers/pci/pcie-sysfs.c:27:25: sparse: symbol 'pcie_link_di Fengguang Wu
  0 siblings, 1 reply; 2+ messages in thread
From: wfg @ 2012-07-11  8:24 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 1001 bytes --]

Hi Yinghai,

There are new sparse warnings show up in

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/yinghai/linux-yinghai.git for-pci-pcie-link
head:   d6396cb3ed85b8a95bd07d9c8f8f70b96a8f3d11
commit: d6396cb3ed85b8a95bd07d9c8f8f70b96a8f3d11 [104/104] PCI: Add link_disable in /sysfs for pcie device

All sparse warnings:

+ drivers/pci/pcie-sysfs.c:27:25: sparse: symbol 'pcie_link_disable_attr' was not declared. Should it be static?
  drivers/pci/pcie-sysfs.c:53:24: sparse: symbol 'pci_dev_pcie_attr_group' was not declared. Should it be static?

vim +27 drivers/pci/pcie-sysfs.c
    24		return count;
    25	}
    26	
  > 27	struct device_attribute pcie_link_disable_attr =
    28			__ATTR(pcie_link_disable, 0644,
    29			       pcie_link_disable_show, pcie_link_disable_store);
    30	

Please consider folding the attached diff :-)

---
0-DAY kernel build testing backend         Open Source Technology Centre
Fengguang Wu <wfg@linux.intel.com>                     Intel Corporation

[-- Attachment #2: make-it-static-d6396cb.diff --]
[-- Type: text/x-diff, Size: 786 bytes --]

diff --git a/drivers/pci/pcie-sysfs.c b/drivers/pci/pcie-sysfs.c
index 04cf34d..4f62d4d 100644
--- a/drivers/pci/pcie-sysfs.c
+++ b/drivers/pci/pcie-sysfs.c
@@ -24,7 +24,7 @@ pcie_link_disable_store(struct device *dev, struct device_attribute *attr,
 	return count;
 }
 
-struct device_attribute pcie_link_disable_attr =
+static struct device_attribute pcie_link_disable_attr =
 		__ATTR(pcie_link_disable, 0644,
 		       pcie_link_disable_show, pcie_link_disable_store);
 
@@ -50,7 +50,7 @@ static umode_t pci_dev_pcie_attrs_are_visible(struct kobject *kobj,
 	return a->mode;
 }
 
-struct attribute_group pci_dev_pcie_attr_group = {
+static struct attribute_group pci_dev_pcie_attr_group = {
 	.is_visible = pci_dev_pcie_attrs_are_visible,
 	.attrs	    = pci_dev_pcie_dev_attrs,
 };

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

* Re: [yinghai:for-pci-pcie-link 104/104] drivers/pci/pcie-sysfs.c:27:25: sparse: symbol 'pcie_link_di
  2012-07-11  8:24 [yinghai:for-pci-pcie-link 104/104] drivers/pci/pcie-sysfs.c:27:25: sparse: symbol 'pcie_link_disabl wfg
@ 2012-07-11  8:29 ` Fengguang Wu
  0 siblings, 0 replies; 2+ messages in thread
From: Fengguang Wu @ 2012-07-11  8:29 UTC (permalink / raw)
  To: kernel-janitors

On Wed, Jul 11, 2012 at 04:24:58PM +0800, wfg@linux.intel.com wrote:
> Hi Yinghai,
> 
> There are new sparse warnings show up in
> 
> tree:   git://git.kernel.org/pub/scm/linux/kernel/git/yinghai/linux-yinghai.git for-pci-pcie-link
> head:   d6396cb3ed85b8a95bd07d9c8f8f70b96a8f3d11
> commit: d6396cb3ed85b8a95bd07d9c8f8f70b96a8f3d11 [104/104] PCI: Add link_disable in /sysfs for pcie device
> 
> All sparse warnings:
> 
> + drivers/pci/pcie-sysfs.c:27:25: sparse: symbol 'pcie_link_disable_attr' was not declared. Should it be static?
>   drivers/pci/pcie-sysfs.c:53:24: sparse: symbol 'pci_dev_pcie_attr_group' was not declared. Should it be static?

Sorry, that 2nd sparse warning is actually false warning.
The full diff won't compile.

Thanks,
Fengguang

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

end of thread, other threads:[~2012-07-11  8:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-11  8:24 [yinghai:for-pci-pcie-link 104/104] drivers/pci/pcie-sysfs.c:27:25: sparse: symbol 'pcie_link_disabl wfg
2012-07-11  8:29 ` [yinghai:for-pci-pcie-link 104/104] drivers/pci/pcie-sysfs.c:27:25: sparse: symbol 'pcie_link_di Fengguang Wu

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).