Hi Michael,

I love your patch! Perhaps something to improve:

[auto build test WARNING on ljones-mfd/for-mfd-next]
[also build test WARNING on shawnguo/for-next v5.8-rc5]
[cannot apply to gpio/for-next hwmon/hwmon-next next-20200716]
[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/Michael-Walle/Add-support-for-Kontron-sl28cpld/20200707-020034
base:   https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git for-mfd-next
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 
ed6b578040a85977026c93bf4188f996148f3218)
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
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>

All warnings (new ones prefixed by >>):

>> drivers/gpio/gpio-sl28cpld.c:121:29: warning: implicit conversion from 
>> 'unsigned long' to 'unsigned int' changes value from 18446744073709551615 to 
>> 4294967295 [-Wconstant-conversion]
                   config.reg_dir_out_base = GPIO_REGMAP_ADDR(base + 
GPIO_REG_DIR);
                                           ~ 
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/gpio/regmap.h:12:44: note: expanded from macro 
'GPIO_REGMAP_ADDR'
   #define GPIO_REGMAP_ADDR(addr) ((addr) ? : GPIO_REGMAP_ADDR_ZERO)
                                              ^~~~~~~~~~~~~~~~~~~~~
   include/linux/gpio/regmap.h:11:32: note: expanded from macro 
'GPIO_REGMAP_ADDR_ZERO'
   #define GPIO_REGMAP_ADDR_ZERO ((unsigned long)(-1))
                                  ^~~~~~~~~~~~~~~~~~~
   1 warning generated.

vim +121 drivers/gpio/gpio-sl28cpld.c

    88  
    89  static int sl28cpld_gpio_probe(struct platform_device *pdev)
    90  {
    91          struct gpio_regmap_config config = {0};
    92          enum sl28cpld_gpio_type type;
    93          struct regmap *regmap;
    94          u32 base;
    95          int ret;
    96  
    97          if (!pdev->dev.parent)
    98                  return -ENODEV;
    99  
   100          type = (uintptr_t)device_get_match_data(&pdev->dev);
   101          if (!type)
   102                  return -ENODEV;
   103  
   104          ret = device_property_read_u32(&pdev->dev, "reg", &base);
   105          if (ret)
   106                  return -EINVAL;
   107  
   108          regmap = dev_get_regmap(pdev->dev.parent, NULL);
   109          if (!regmap)
   110                  return -ENODEV;
   111  
   112          config.regmap = regmap;
   113          config.parent = &pdev->dev;
   114          config.ngpio = 8;
   115  
   116          switch (type) {
   117          case SL28CPLD_GPIO:
   118                  config.reg_dat_base = base + GPIO_REG_IN;
   119                  config.reg_set_base = base + GPIO_REG_OUT;
   120                  /* reg_dir_out_base might be zero */
 > 121                  config.reg_dir_out_base = GPIO_REGMAP_ADDR(base + 
 > GPIO_REG_DIR);
   122  
   123                  /* This type supports interrupts */
   124                  ret = sl28cpld_gpio_irq_init(pdev, base, &config);
   125                  if (ret)
   126                          return ret;
   127                  break;
   128          case SL28CPLD_GPO:
   129                  config.reg_set_base = base + GPO_REG_OUT;
   130                  break;
   131          case SL28CPLD_GPI:
   132                  config.reg_dat_base = base + GPI_REG_IN;
   133                  break;
   134          default:
   135                  dev_err(&pdev->dev, "unknown type %d\n", type);
   136                  return -ENODEV;
   137          }
   138  
   139          return PTR_ERR_OR_ZERO(devm_gpio_regmap_register(&pdev->dev, 
&config));
   140  }
   141  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

Attachment: .config.gz
Description: application/gzip

Reply via email to