[pci:controller/rockchip 13/13] drivers/pci/controller/pcie-rockchip-ep.c:640:9: error: implicit declaration of function 'irq_set_irq_type'; did you mean 'irq_set_irq_wake'?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git controller/rockchip
head:   337657a3c24c92befb3ed11d6f15402faa09f7dd
commit: 337657a3c24c92befb3ed11d6f15402faa09f7dd [13/13] PCI: rockchip-ep: Handle PERST# signal in endpoint mode
config: sparc-allmodconfig (https://download.01.org/0day-ci/archive/20241114/202411141621.uwFAKZb2-lkp@xxxxxxxxx/config)
compiler: sparc64-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241114/202411141621.uwFAKZb2-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202411141621.uwFAKZb2-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   drivers/pci/controller/pcie-rockchip-ep.c: In function 'rockchip_pcie_ep_perst_irq_thread':
>> drivers/pci/controller/pcie-rockchip-ep.c:640:9: error: implicit declaration of function 'irq_set_irq_type'; did you mean 'irq_set_irq_wake'? [-Wimplicit-function-declaration]
     640 |         irq_set_irq_type(ep->perst_irq,
         |         ^~~~~~~~~~~~~~~~
         |         irq_set_irq_wake
   drivers/pci/controller/pcie-rockchip-ep.c: In function 'rockchip_pcie_ep_setup_irq':
>> drivers/pci/controller/pcie-rockchip-ep.c:672:9: error: implicit declaration of function 'irq_set_status_flags' [-Wimplicit-function-declaration]
     672 |         irq_set_status_flags(ep->perst_irq, IRQ_NOAUTOEN);
         |         ^~~~~~~~~~~~~~~~~~~~
>> drivers/pci/controller/pcie-rockchip-ep.c:672:45: error: 'IRQ_NOAUTOEN' undeclared (first use in this function); did you mean 'IRQF_NO_AUTOEN'?
     672 |         irq_set_status_flags(ep->perst_irq, IRQ_NOAUTOEN);
         |                                             ^~~~~~~~~~~~
         |                                             IRQF_NO_AUTOEN
   drivers/pci/controller/pcie-rockchip-ep.c:672:45: note: each undeclared identifier is reported only once for each function it appears in
   drivers/pci/controller/pcie-rockchip-ep.c: At top level:
   drivers/pci/controller/pcie-rockchip-ep.c:705:10: error: 'const struct pci_epc_ops' has no member named 'align_addr'
     705 |         .align_addr     = rockchip_pcie_ep_align_addr,
         |          ^~~~~~~~~~
   drivers/pci/controller/pcie-rockchip-ep.c:705:27: error: initialization of 'int (*)(struct pci_epc *, u8,  u8,  phys_addr_t,  u64,  size_t)' {aka 'int (*)(struct pci_epc *, unsigned char,  unsigned char,  long long unsigned int,  long long unsigned int,  long unsigned int)'} from incompatible pointer type 'u64 (*)(struct pci_epc *, u64,  size_t *, size_t *)' {aka 'long long unsigned int (*)(struct pci_epc *, long long unsigned int,  long unsigned int *, long unsigned int *)'} [-Wincompatible-pointer-types]
     705 |         .align_addr     = rockchip_pcie_ep_align_addr,
         |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/pci/controller/pcie-rockchip-ep.c:705:27: note: (near initialization for 'rockchip_pcie_epc_ops.map_addr')
   drivers/pci/controller/pcie-rockchip-ep.c:706:27: warning: initialized field overwritten [-Woverride-init]
     706 |         .map_addr       = rockchip_pcie_ep_map_addr,
         |                           ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/pci/controller/pcie-rockchip-ep.c:706:27: note: (near initialization for 'rockchip_pcie_epc_ops.map_addr')


vim +640 drivers/pci/controller/pcie-rockchip-ep.c

   627	
   628	static irqreturn_t rockchip_pcie_ep_perst_irq_thread(int irq, void *data)
   629	{
   630		struct pci_epc *epc = data;
   631		struct rockchip_pcie_ep *ep = epc_get_drvdata(epc);
   632		struct rockchip_pcie *rockchip = &ep->rockchip;
   633		u32 perst = gpiod_get_value(rockchip->perst_gpio);
   634	
   635		if (perst)
   636			rockchip_pcie_ep_perst_assert(ep);
   637		else
   638			rockchip_pcie_ep_perst_deassert(ep);
   639	
 > 640		irq_set_irq_type(ep->perst_irq,
   641				 (perst ? IRQF_TRIGGER_HIGH : IRQF_TRIGGER_LOW));
   642	
   643		return IRQ_HANDLED;
   644	}
   645	
   646	static int rockchip_pcie_ep_setup_irq(struct pci_epc *epc)
   647	{
   648		struct rockchip_pcie_ep *ep = epc_get_drvdata(epc);
   649		struct rockchip_pcie *rockchip = &ep->rockchip;
   650		struct device *dev = rockchip->dev;
   651		int ret;
   652	
   653		if (!rockchip->perst_gpio)
   654			return 0;
   655	
   656		/* PCIe reset interrupt */
   657		ep->perst_irq = gpiod_to_irq(rockchip->perst_gpio);
   658		if (ep->perst_irq < 0) {
   659			dev_err(dev,
   660				"failed to get IRQ for PERST# GPIO: %d\n",
   661				ep->perst_irq);
   662	
   663			return ep->perst_irq;
   664		}
   665	
   666		/*
   667		 * The perst_gpio is active low, so when it is inactive on start, it
   668		 * is high and will trigger the perst_irq handler. So treat this initial
   669		 * IRQ as a dummy one by faking the host asserting PERST#.
   670		 */
   671		ep->perst_asserted = true;
 > 672		irq_set_status_flags(ep->perst_irq, IRQ_NOAUTOEN);
   673		ret = devm_request_threaded_irq(dev, ep->perst_irq, NULL,
   674						rockchip_pcie_ep_perst_irq_thread,
   675						IRQF_TRIGGER_HIGH | IRQF_ONESHOT,
   676						"pcie-ep-perst", epc);
   677		if (ret) {
   678			dev_err(dev,
   679				"failed to request IRQ for PERST# GPIO: %d\n",
   680				ret);
   681	
   682			return ret;
   683		}
   684	
   685		return 0;
   686	}
   687	

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




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux