Linux GPIO subsystem development
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>,
	Matti Vaittinen <mazziesaccount@gmail.com>
Cc: kbuild-all@lists.01.org, Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	Michael Walle <michael@walle.cc>,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-power@fi.rohmeurope.com
Subject: Re: [PATCH v3 1/3] gpio: regmap: Support few IC specific operations
Date: Tue, 25 May 2021 22:45:51 +0800	[thread overview]
Message-ID: <202105252234.eWO5rHOb-lkp@intel.com> (raw)
In-Reply-To: <116225e2cee20a8ad793f775c5d98aa4d24318d4.1621863253.git.matti.vaittinen@fi.rohmeurope.com>

[-- Attachment #1: Type: text/plain, Size: 5965 bytes --]

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@intel.com>

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@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 41569 bytes --]

  reply	other threads:[~2021-05-25 14:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-25 12:43 [PATCH v3 0/3] gpio: gpio-regmap: Support few custom operations Matti Vaittinen
2021-05-25 12:43 ` [PATCH v3 1/3] gpio: regmap: Support few IC specific operations Matti Vaittinen
2021-05-25 14:45   ` kernel test robot [this message]
2021-05-25 15:31   ` kernel test robot
2021-05-25 15:39     ` Vaittinen, Matti
2021-05-25 12:44 ` [PATCH v3 2/3] gpio: gpio-regmap: Use devm_add_action_or_reset() Matti Vaittinen
2021-05-25 12:44 ` [PATCH v3 3/3] gpio: bd71815: Use gpio-regmap Matti Vaittinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202105252234.eWO5rHOb-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-power@fi.rohmeurope.com \
    --cc=matti.vaittinen@fi.rohmeurope.com \
    --cc=mazziesaccount@gmail.com \
    --cc=michael@walle.cc \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox