Re: [pci:controller/dwc-cpu-addr-fixup 6/14] drivers/pci/controller/dwc/pcie-designware.c:1130:55: sparse: sparse: Using plain integer as NULL pointer

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

 



On Fri, Mar 21, 2025 at 06:56:55AM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git controller/dwc-cpu-addr-fixup
> head:   94d1d26431c0e4c845e9e9ee5f23bcc9a53d95ec
> commit: c1154a3218325a03cd07df51a7076a353a723589 [6/14] PCI: dwc: Add dw_pcie_parent_bus_offset() checking and debug
> config: alpha-randconfig-r121-20250321 (https://download.01.org/0day-ci/archive/20250321/202503210649.lau9JEgG-lkp@xxxxxxxxx/config)
> compiler: alpha-linux-gcc (GCC) 12.4.0
> reproduce: (https://download.01.org/0day-ci/archive/20250321/202503210649.lau9JEgG-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/202503210649.lau9JEgG-lkp@xxxxxxxxx/
> 
> sparse warnings: (new ones prefixed by >>)
> >> drivers/pci/controller/dwc/pcie-designware.c:1130:55: sparse: sparse: Using plain integer as NULL pointer

> vim +1130 drivers/pci/controller/dwc/pcie-designware.c
> 
>   1109	
>   1110	resource_size_t dw_pcie_parent_bus_offset(struct dw_pcie *pci,
>   1111						  const char *reg_name,
>   1112						  resource_size_t cpu_phy_addr)
>   1113	{

> > 1130		fixup = pci->ops ? pci->ops->cpu_addr_fixup : 0;

Replaced with

    fixup = pci->ops ? pci->ops->cpu_addr_fixup : NULL;




[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