Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [tglx-devel:irq/msi 9/11] drivers/pci/tph.c:307:38: error: use of undeclared identifier 'msix_idx'
Date: Sat, 8 Mar 2025 09:53:12 +0800	[thread overview]
Message-ID: <202503080952.nzeYvx81-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git irq/msi
head:   3c18507c3399a1cedf7a102a03c28ffab3e785aa
commit: defb1c68db9bbe478ff9e59d0dcd70a9d0d1376f [9/11] PCI/TPH: Replace the broken MSI-X control word update
config: i386-buildonly-randconfig-005-20250308 (https://download.01.org/0day-ci/archive/20250308/202503080952.nzeYvx81-lkp@intel.com/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250308/202503080952.nzeYvx81-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202503080952.nzeYvx81-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/pci/tph.c:307:38: error: use of undeclared identifier 'msix_idx'
     307 |                 err = pci_msix_write_tph_tag(pdev, msix_idx, tag);
         |                                                    ^
   1 error generated.


vim +/msix_idx +307 drivers/pci/tph.c

   267	
   268	/**
   269	 * pcie_tph_set_st_entry() - Set Steering Tag in the ST table entry
   270	 * @pdev: PCI device
   271	 * @index: ST table entry index
   272	 * @tag: Steering Tag to be written
   273	 *
   274	 * Figure out the proper location of ST table, either in the MSI-X table or
   275	 * in the TPH Extended Capability space, and write the Steering Tag into
   276	 * the ST entry pointed by index.
   277	 *
   278	 * Return: 0 if success, otherwise negative value (-errno)
   279	 */
   280	int pcie_tph_set_st_entry(struct pci_dev *pdev, unsigned int index, u16 tag)
   281	{
   282		u32 loc;
   283		int err = 0;
   284	
   285		if (!pdev->tph_cap)
   286			return -EINVAL;
   287	
   288		if (!pdev->tph_enabled)
   289			return -EINVAL;
   290	
   291		/* No need to write tag if device is in "No ST Mode" */
   292		if (pdev->tph_mode == PCI_TPH_ST_NS_MODE)
   293			return 0;
   294	
   295		/*
   296		 * Disable TPH before updating ST to avoid potential instability as
   297		 * cautioned in PCIe r6.2, sec 6.17.3, "ST Modes of Operation"
   298		 */
   299		set_ctrl_reg_req_en(pdev, PCI_TPH_REQ_DISABLE);
   300	
   301		loc = get_st_table_loc(pdev);
   302		/* Convert loc to match with PCI_TPH_LOC_* */
   303		loc = FIELD_PREP(PCI_TPH_CAP_LOC_MASK, loc);
   304	
   305		switch (loc) {
   306		case PCI_TPH_LOC_MSIX:
 > 307			err = pci_msix_write_tph_tag(pdev, msix_idx, tag);
   308			break;
   309		case PCI_TPH_LOC_CAP:
   310			err = write_tag_to_st_table(pdev, index, tag);
   311			break;
   312		default:
   313			err = -EINVAL;
   314		}
   315	
   316		if (err) {
   317			pcie_disable_tph(pdev);
   318			return err;
   319		}
   320	
   321		set_ctrl_reg_req_en(pdev, pdev->tph_req_type);
   322	
   323		pci_dbg(pdev, "set steering tag: %s table, index=%d, tag=%#04x\n",
   324			(loc == PCI_TPH_LOC_MSIX) ? "MSI-X" : "ST", index, tag);
   325	
   326		return 0;
   327	}
   328	EXPORT_SYMBOL(pcie_tph_set_st_entry);
   329	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2025-03-08  1:54 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=202503080952.nzeYvx81-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=tglx@linutronix.de \
    /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