Re: [PATCH 2/2] PCI: sprd: Add support for Unisoc SoCs' PCIe controller

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

 



Hi Hongtao,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on pci/next]
[also build test WARNING on robh/for-next v5.9-rc1 next-20200821]
[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]

url:    https://github.com/0day-ci/linux/commits/Hongtao-Wu/PCI-Add-new-Unisoc-PCIe-driver/20200821-175351
base:   https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.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
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

>> drivers/pci/controller/dwc/pcie-sprd.c:43:5: warning: no previous prototype for 'sprd_pcie_syscon_setting' [-Wmissing-prototypes]
      43 | int sprd_pcie_syscon_setting(struct platform_device *pdev, char *env)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~

# https://github.com/0day-ci/linux/commit/b82baaf6b6b4a04032d29dd7b749d1f9c4a23104
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Hongtao-Wu/PCI-Add-new-Unisoc-PCIe-driver/20200821-175351
git checkout b82baaf6b6b4a04032d29dd7b749d1f9c4a23104
vim +/sprd_pcie_syscon_setting +43 drivers/pci/controller/dwc/pcie-sprd.c

    42	
  > 43	int sprd_pcie_syscon_setting(struct platform_device *pdev, char *env)
    44	{
    45	       struct device_node *np = pdev->dev.of_node;
    46	       int i, count, err;
    47	       u32 type, delay, reg, mask, val, tmp_val;
    48	       struct of_phandle_args out_args;
    49	       struct regmap *iomap;
    50	       struct device *dev = &pdev->dev;
    51	
    52	       if (!of_find_property(np, env, NULL)) {
    53	               dev_info(dev, "There isn't property %s in dts\n", env);
    54	               return 0;
    55	       }
    56	
    57	       count = of_property_count_elems_of_size(np, env,
    58	                               (NUM_OF_ARGS + 1) * sizeof(u32));
    59	       dev_info(dev, "Property (%s) reg count is %d :\n", env, count);
    60	
    61	       for (i = 0; i < count; i++) {
    62	               err = of_parse_phandle_with_fixed_args(np, env, NUM_OF_ARGS,
    63	                                                      i, &out_args);
    64	               if (err < 0)
    65	                       return err;
    66	
    67	               type = out_args.args[0];
    68	               delay = out_args.args[1];
    69	               reg = out_args.args[2];
    70	               mask = out_args.args[3];
    71	               val = out_args.args[4];
    72	
    73	               iomap = syscon_node_to_regmap(out_args.np);
    74	
    75	               switch (type) {
    76	               case 0:
    77	                       regmap_update_bits(iomap, reg, mask, val);
    78	                       break;
    79	
    80	               case 1:
    81	                       regmap_read(iomap, reg, &tmp_val);
    82	                       tmp_val &= (~mask);
    83	                       tmp_val |= (val & mask);
    84	                       regmap_write(iomap, reg, tmp_val);
    85	                       break;
    86	               default:
    87	                       break;
    88	               }
    89	
    90	               if (delay)
    91	                       usleep_range(delay, delay + 10);
    92	
    93	               regmap_read(iomap, reg, &tmp_val);
    94	               dev_dbg(&pdev->dev,
    95	                       "%2d:reg[0x%8x] mask[0x%8x] val[0x%8x] result[0x%8x]\n",
    96	                       i, reg, mask, val, tmp_val);
    97	       }
    98	
    99	       return i;
   100	}
   101	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux