Re: [PATCH] PCI: rockchip: Use dev_err_probe()

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

 



Hi,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on pci/next]
[also build test WARNING on pci/for-linus linus/master v6.3-rc3 next-20230323]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/ye-xingchen-zte-com-cn/PCI-rockchip-Use-dev_err_probe/20230323-114809
base:   https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git next
patch link:    https://lore.kernel.org/r/202303231146312337844%40zte.com.cn
patch subject: [PATCH] PCI: rockchip: Use dev_err_probe()
config: ia64-allyesconfig (https://download.01.org/0day-ci/archive/20230323/202303231338.oVZa9IHF-lkp@xxxxxxxxx/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/intel-lab-lkp/linux/commit/4ad6c26e54b926f384a1bdc99892900cbfa83eea
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review ye-xingchen-zte-com-cn/PCI-rockchip-Use-dev_err_probe/20230323-114809
        git checkout 4ad6c26e54b926f384a1bdc99892900cbfa83eea
        # 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@xxxxxxxxx>
| Link: https://lore.kernel.org/oe-kbuild-all/202303231338.oVZa9IHF-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   drivers/pci/controller/pcie-rockchip.c: In function 'rockchip_pcie_get_phys':
>> drivers/pci/controller/pcie-rockchip.c:313:74: warning: format '%ld' expects a matching 'long int' argument [-Wformat=]
     313 |                                              "missing phy for lane %d: %ld\n", i);
         |                                                                        ~~^
         |                                                                          |
         |                                                                          long int


vim +313 drivers/pci/controller/pcie-rockchip.c

   282	
   283	int rockchip_pcie_get_phys(struct rockchip_pcie *rockchip)
   284	{
   285		struct device *dev = rockchip->dev;
   286		struct phy *phy;
   287		char *name;
   288		u32 i;
   289	
   290		phy = devm_phy_get(dev, "pcie-phy");
   291		if (!IS_ERR(phy)) {
   292			rockchip->legacy_phy = true;
   293			rockchip->phys[0] = phy;
   294			dev_warn(dev, "legacy phy model is deprecated!\n");
   295			return 0;
   296		}
   297	
   298		if (PTR_ERR(phy) == -EPROBE_DEFER)
   299			return PTR_ERR(phy);
   300	
   301		dev_dbg(dev, "missing legacy phy; search for per-lane PHY\n");
   302	
   303		for (i = 0; i < MAX_LANE_NUM; i++) {
   304			name = kasprintf(GFP_KERNEL, "pcie-phy-%u", i);
   305			if (!name)
   306				return -ENOMEM;
   307	
   308			phy = devm_of_phy_get(dev, dev->of_node, name);
   309			kfree(name);
   310	
   311			if (IS_ERR(phy))
   312				return dev_err_probe(dev, PTR_ERR(phy),
 > 313						     "missing phy for lane %d: %ld\n", i);
   314	
   315			rockchip->phys[i] = phy;
   316		}
   317	
   318		return 0;
   319	}
   320	EXPORT_SYMBOL_GPL(rockchip_pcie_get_phys);
   321	

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



[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