All of lore.kernel.org
 help / color / mirror / Atom feed
* [l1k:pciehp_deadlock_v2 2/2] drivers/pci/hotplug/pciehp_core.c:167:32: warning: initialization of 'struct pci_dev *' from 'int' makes pointer from integer without a cast
@ 2023-01-21 12:13 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-01-21 12:13 UTC (permalink / raw)
  To: Lukas Wunner; +Cc: oe-kbuild-all

tree:   https://github.com/l1k/linux pciehp_deadlock_v2
head:   f333e7ec9e2c377c76238169a1d437e929937223
commit: f333e7ec9e2c377c76238169a1d437e929937223 [2/2] PCI: pciehp: Fix AB-BA deadlock between reset_lock and device_lock
config: ia64-allyesconfig (https://download.01.org/0day-ci/archive/20230121/202301212043.CowpMXQU-lkp@intel.com/config)
compiler: ia64-linux-gcc (GCC) 12.1.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://github.com/l1k/linux/commit/f333e7ec9e2c377c76238169a1d437e929937223
        git remote add l1k https://github.com/l1k/linux
        git fetch --no-tags l1k pciehp_deadlock_v2
        git checkout f333e7ec9e2c377c76238169a1d437e929937223
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=ia64 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=ia64 SHELL=/bin/bash drivers/pci/

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

All warnings (new ones prefixed by >>):

   drivers/pci/hotplug/pciehp_core.c: In function 'pciehp_check_presence':
   drivers/pci/hotplug/pciehp_core.c:167:32: error: implicit declaration of function 'ctrl_dev'; did you mean 'ctrl_dbg'? [-Werror=implicit-function-declaration]
     167 |         struct pci_dev *pdev = ctrl_dev(ctrl);
         |                                ^~~~~~~~
         |                                ctrl_dbg
>> drivers/pci/hotplug/pciehp_core.c:167:32: warning: initialization of 'struct pci_dev *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
   cc1: some warnings being treated as errors


vim +167 drivers/pci/hotplug/pciehp_core.c

   153	
   154	/**
   155	 * pciehp_check_presence() - synthesize event if presence has changed
   156	 * @ctrl: controller to check
   157	 *
   158	 * On probe and resume, an explicit presence check is necessary to bring up an
   159	 * occupied slot or bring down an unoccupied slot.  This can't be triggered by
   160	 * events in the Slot Status register, they may be stale and are therefore
   161	 * cleared.  Secondly, sending an interrupt for "events that occur while
   162	 * interrupt generation is disabled [when] interrupt generation is subsequently
   163	 * enabled" is optional per PCIe r4.0, sec 6.7.3.4.
   164	 */
   165	static void pciehp_check_presence(struct controller *ctrl)
   166	{
 > 167		struct pci_dev *pdev = ctrl_dev(ctrl);
   168		int occupied;
   169	
   170		down_read(&pdev->reset_lock);
   171		mutex_lock(&ctrl->state_lock);
   172	
   173		occupied = pciehp_card_present_or_link_active(ctrl);
   174		if ((occupied > 0 && (ctrl->state == OFF_STATE ||
   175				  ctrl->state == BLINKINGON_STATE)) ||
   176		    (!occupied && (ctrl->state == ON_STATE ||
   177				   ctrl->state == BLINKINGOFF_STATE)))
   178			pciehp_request(ctrl, PCI_EXP_SLTSTA_PDC);
   179	
   180		mutex_unlock(&ctrl->state_lock);
   181		up_read(&pdev->reset_lock);
   182	}
   183	

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

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

only message in thread, other threads:[~2023-01-21 12:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-21 12:13 [l1k:pciehp_deadlock_v2 2/2] drivers/pci/hotplug/pciehp_core.c:167:32: warning: initialization of 'struct pci_dev *' from 'int' makes pointer from integer without a cast 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.