Re: [PATCH v3 1/3] gpio: regmap: Support few IC specific operations

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

 



Hi Matti,

I love your patch! Yet something to improve:

[auto build test ERROR on c4681547bcce777daf576925a966ffa824edd09d]

url:    https://github.com/0day-ci/linux/commits/Matti-Vaittinen/gpio-gpio-regmap-Support-few-custom-operations/20210525-204554
base:   c4681547bcce777daf576925a966ffa824edd09d
config: powerpc-randconfig-s031-20210525 (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.3-341-g8af24329-dirty
        # https://github.com/0day-ci/linux/commit/fac1c3d2b667e599ee2e3bba357847f9a35f43c7
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Matti-Vaittinen/gpio-gpio-regmap-Support-few-custom-operations/20210525-204554
        git checkout fac1c3d2b667e599ee2e3bba357847f9a35f43c7
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=powerpc 

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

All errors (new ones prefixed by >>):

   drivers/gpio/gpio-sl28cpld.c: In function 'sl28cpld_gpio_probe':
>> drivers/gpio/gpio-sl28cpld.c:139:25: error: too few arguments to function 'devm_gpio_regmap_register'
     139 |  return PTR_ERR_OR_ZERO(devm_gpio_regmap_register(&pdev->dev, &config));
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/gpio/gpio-sl28cpld.c:10:
   include/linux/gpio/regmap.h:105:21: note: declared here
     105 | struct gpio_regmap *devm_gpio_regmap_register(struct device *dev,
         |                     ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpio/gpio-sl28cpld.c:140:1: error: control reaches end of non-void function [-Werror=return-type]
     140 | }
         | ^
   cc1: some warnings being treated as errors


vim +/devm_gpio_regmap_register +139 drivers/gpio/gpio-sl28cpld.c

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

---
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]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux