All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 10187/13594] drivers/pci/pcie/ptm.c:498:25: error: redefinition of 'pcie_ptm_create_debugfs'
@ 2025-05-27 17:33 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-05-27 17:33 UTC (permalink / raw)
  To: Manivannan Sadhasivam; +Cc: oe-kbuild-all, Krzysztof Wilczyński

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-05-27 17:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-27 17:33 [linux-next:master 10187/13594] drivers/pci/pcie/ptm.c:498:25: error: redefinition of 'pcie_ptm_create_debugfs' kernel test robot

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.