linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: kbuild-all@lists.01.org, linux-pci@vger.kernel.org
Subject: [pci:pci/aspm 1/1] drivers/pci/pci.c:1523:13: warning: conflicting types for 'pci_restore_ltr_state'
Date: Fri, 19 Feb 2021 16:58:43 +0800	[thread overview]
Message-ID: <202102191629.oaDdZsBF-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git pci/aspm
head:   c79aafccbc64ed34ec6dce84cfa111e839044058
commit: c79aafccbc64ed34ec6dce84cfa111e839044058 [1/1] PCI/ASPM: Move LTR, ASPM L1SS restore closer to use
config: xtensa-virt_defconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git/commit/?id=c79aafccbc64ed34ec6dce84cfa111e839044058
        git remote add pci https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git
        git fetch --no-tags pci pci/aspm
        git checkout c79aafccbc64ed34ec6dce84cfa111e839044058
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=xtensa 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   drivers/pci/pci.c: In function 'pci_restore_pcie_state':
   drivers/pci/pci.c:1450:2: error: implicit declaration of function 'pci_restore_ltr_state'; did you mean 'pci_restore_ptm_state'? [-Werror=implicit-function-declaration]
    1450 |  pci_restore_ltr_state(dev);  /* LTR enabled in DEVCTL2 */
         |  ^~~~~~~~~~~~~~~~~~~~~
         |  pci_restore_ptm_state
   drivers/pci/pci.c: At top level:
>> drivers/pci/pci.c:1523:13: warning: conflicting types for 'pci_restore_ltr_state'
    1523 | static void pci_restore_ltr_state(struct pci_dev *dev)
         |             ^~~~~~~~~~~~~~~~~~~~~
   drivers/pci/pci.c:1523:13: error: static declaration of 'pci_restore_ltr_state' follows non-static declaration
   drivers/pci/pci.c:1450:2: note: previous implicit declaration of 'pci_restore_ltr_state' was here
    1450 |  pci_restore_ltr_state(dev);  /* LTR enabled in DEVCTL2 */
         |  ^~~~~~~~~~~~~~~~~~~~~
   drivers/pci/pci.c:1523:13: warning: 'pci_restore_ltr_state' defined but not used [-Wunused-function]
    1523 | static void pci_restore_ltr_state(struct pci_dev *dev)
         |             ^~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/pci_restore_ltr_state +1523 drivers/pci/pci.c

dbbfadf2319005 Bjorn Helgaas     2019-01-09  1522  
dbbfadf2319005 Bjorn Helgaas     2019-01-09 @1523  static void pci_restore_ltr_state(struct pci_dev *dev)
dbbfadf2319005 Bjorn Helgaas     2019-01-09  1524  {
dbbfadf2319005 Bjorn Helgaas     2019-01-09  1525  	struct pci_cap_saved_state *save_state;
dbbfadf2319005 Bjorn Helgaas     2019-01-09  1526  	int ltr;
dbbfadf2319005 Bjorn Helgaas     2019-01-09  1527  	u16 *cap;
dbbfadf2319005 Bjorn Helgaas     2019-01-09  1528  
dbbfadf2319005 Bjorn Helgaas     2019-01-09  1529  	save_state = pci_find_saved_ext_cap(dev, PCI_EXT_CAP_ID_LTR);
dbbfadf2319005 Bjorn Helgaas     2019-01-09  1530  	ltr = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_LTR);
dbbfadf2319005 Bjorn Helgaas     2019-01-09  1531  	if (!save_state || !ltr)
dbbfadf2319005 Bjorn Helgaas     2019-01-09  1532  		return;
dbbfadf2319005 Bjorn Helgaas     2019-01-09  1533  
dbbfadf2319005 Bjorn Helgaas     2019-01-09  1534  	cap = (u16 *)&save_state->cap.data[0];
dbbfadf2319005 Bjorn Helgaas     2019-01-09  1535  	pci_write_config_word(dev, ltr + PCI_LTR_MAX_SNOOP_LAT, *cap++);
dbbfadf2319005 Bjorn Helgaas     2019-01-09  1536  	pci_write_config_word(dev, ltr + PCI_LTR_MAX_NOSNOOP_LAT, *cap++);
dbbfadf2319005 Bjorn Helgaas     2019-01-09  1537  }
cc692a5f1e9816 Stephen Hemminger 2006-11-08  1538  

:::::: The code at line 1523 was first introduced by commit
:::::: dbbfadf2319005cf528b0f15f12a05d4e4644303 PCI/ASPM: Save LTR Capability for suspend/resume

:::::: TO: Bjorn Helgaas <bhelgaas@google.com>
:::::: CC: Bjorn Helgaas <helgaas@kernel.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 14266 bytes --]

                 reply	other threads:[~2021-02-19  8:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202102191629.oaDdZsBF-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=helgaas@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-pci@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;
as well as URLs for NNTP newsgroup(s).