public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: wfg@linux.intel.com
To: kernel-janitors@vger.kernel.org
Subject: [yinghai:for-pci-pcie-link 104/104] drivers/pci/pcie-sysfs.c:27:25: sparse: symbol 'pcie_link_disabl
Date: Wed, 11 Jul 2012 08:24:58 +0000	[thread overview]
Message-ID: <20120711082458.GA23164@localhost> (raw)

[-- 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,
 };

             reply	other threads:[~2012-07-11  8:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-11  8:24 wfg [this message]
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

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=20120711082458.GA23164@localhost \
    --to=wfg@linux.intel.com \
    --cc=kernel-janitors@vger.kernel.org \
    /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