All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Cc: oe-kbuild-all@lists.linux.dev,
	"Krzysztof Wilczyński" <kwilczynski@kernel.org>
Subject: [linux-next:master 10187/13594] drivers/pci/pcie/ptm.c:498:25: error: redefinition of 'pcie_ptm_create_debugfs'
Date: Wed, 28 May 2025 01:33:14 +0800	[thread overview]
Message-ID: <202505280148.rGiCfv4x-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   fefff2755f2aa4125dce2a1edfe7e545c7c621f2
commit: 132833405e61463d47d6badff1b8080b09b5808e [10187/13594] PCI: Add debugfs support for exposing PTM context
config: alpha-randconfig-r071-20250527 (https://download.01.org/0day-ci/archive/20250528/202505280148.rGiCfv4x-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250528/202505280148.rGiCfv4x-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/202505280148.rGiCfv4x-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/pci/pcie/ptm.c:498:25: error: redefinition of 'pcie_ptm_create_debugfs'
     498 | struct pci_ptm_debugfs *pcie_ptm_create_debugfs(struct device *dev, void *pdata,
         |                         ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/pci/pcie/ptm.c:11:
   include/linux/pci.h:1910:2: note: previous definition of 'pcie_ptm_create_debugfs' with type 'struct pci_ptm_debugfs *(struct device *, void *, const struct pcie_ptm_ops *)'
    1910 | *pcie_ptm_create_debugfs(struct device *dev, void *pdata,
         |  ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/pci/pcie/ptm.c:546:6: error: redefinition of 'pcie_ptm_destroy_debugfs'
     546 | void pcie_ptm_destroy_debugfs(struct pci_ptm_debugfs *ptm_debugfs)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/pci.h:1913:1: note: previous definition of 'pcie_ptm_destroy_debugfs' with type 'void(struct pci_ptm_debugfs *)'
    1913 | pcie_ptm_destroy_debugfs(struct pci_ptm_debugfs *ptm_debugfs) { }
         | ^~~~~~~~~~~~~~~~~~~~~~~~


vim +/pcie_ptm_create_debugfs +498 drivers/pci/pcie/ptm.c

   479	
   480	#define pcie_ptm_create_debugfs_file(pdata, mode, attr)			\
   481		do {								\
   482			if (ops->attr##_visible && ops->attr##_visible(pdata))	\
   483				debugfs_create_file(#attr, mode, ptm_debugfs->debugfs, \
   484						    ptm_debugfs, &attr##_fops);	\
   485		} while (0)
   486	
   487	/*
   488	 * pcie_ptm_create_debugfs() - Create debugfs entries for the PTM context
   489	 * @dev: PTM capable component device
   490	 * @pdata: Private data of the PTM capable component device
   491	 * @ops: PTM callback structure
   492	 *
   493	 * Create debugfs entries for exposing the PTM context of the PTM capable
   494	 * components such as Root Complex and Endpoint controllers.
   495	 *
   496	 * Return: Pointer to 'struct pci_ptm_debugfs' if success, NULL otherwise.
   497	 */
 > 498	struct pci_ptm_debugfs *pcie_ptm_create_debugfs(struct device *dev, void *pdata,
   499				  const struct pcie_ptm_ops *ops)
   500	{
   501		struct pci_ptm_debugfs *ptm_debugfs;
   502		char *dirname;
   503		int ret;
   504	
   505		/* Caller must provide check_capability() callback */
   506		if (!ops->check_capability)
   507			return NULL;
   508	
   509		/* Check for PTM capability before creating debugfs attrbutes */
   510		ret = ops->check_capability(pdata);
   511		if (!ret) {
   512			dev_dbg(dev, "PTM capability not present\n");
   513			return NULL;
   514		}
   515	
   516		ptm_debugfs = kzalloc(sizeof(*ptm_debugfs), GFP_KERNEL);
   517		if (!ptm_debugfs)
   518			return NULL;
   519	
   520		dirname = devm_kasprintf(dev, GFP_KERNEL, "pcie_ptm_%s", dev_name(dev));
   521		if (!dirname)
   522			return NULL;
   523	
   524		ptm_debugfs->debugfs = debugfs_create_dir(dirname, NULL);
   525		ptm_debugfs->pdata = pdata;
   526		ptm_debugfs->ops = ops;
   527		mutex_init(&ptm_debugfs->lock);
   528	
   529		pcie_ptm_create_debugfs_file(pdata, 0644, context_update);
   530		pcie_ptm_create_debugfs_file(pdata, 0644, context_valid);
   531		pcie_ptm_create_debugfs_file(pdata, 0444, local_clock);
   532		pcie_ptm_create_debugfs_file(pdata, 0444, master_clock);
   533		pcie_ptm_create_debugfs_file(pdata, 0444, t1);
   534		pcie_ptm_create_debugfs_file(pdata, 0444, t2);
   535		pcie_ptm_create_debugfs_file(pdata, 0444, t3);
   536		pcie_ptm_create_debugfs_file(pdata, 0444, t4);
   537	
   538		return ptm_debugfs;
   539	}
   540	EXPORT_SYMBOL_GPL(pcie_ptm_create_debugfs);
   541	
   542	/*
   543	 * pcie_ptm_destroy_debugfs() - Destroy debugfs entries for the PTM context
   544	 * @ptm_debugfs: Pointer to the PTM debugfs struct
   545	 */
 > 546	void pcie_ptm_destroy_debugfs(struct pci_ptm_debugfs *ptm_debugfs)

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

                 reply	other threads:[~2025-05-27 17:34 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=202505280148.rGiCfv4x-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kwilczynski@kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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 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.