Skip to contentSkip to conversation

gpiolib: cdev: add V2 uAPI implementation to parity with V1 (fwd)

PATCH Julia Lawall 2 participants 2 messages Jun 23, 2020 – Jun 24, 2020 GPIO

lore
Share & tools
lore
#0 lore raw

It looks like the put_device (line 891) should be one line earlier.

julia

---------- Forwarded message ----------
Date: Tue, 23 Jun 2020 15:26:47 +0800
From: kernel test robot <[email protected]>
To: kbuild(a)lists.01.org
Cc: lkp(a)intel.com, Julia Lawall <[email protected]>
Subject: Re: [PATCH 16/22] gpiolib: cdev: add V2 uAPI implementation to parity
with V1

CC: kbuild-all(a)lists.01.org
In-Reply-To: <[email protected]>
References: <[email protected]>
TO: Kent Gibson <[email protected]>
TO: linux-kernel(a)vger.kernel.org
TO: linux-gpio(a)vger.kernel.org
TO: bgolaszewski(a)baylibre.com
TO: linus.walleij(a)linaro.org
CC: Kent Gibson <[email protected]>

Hi Kent,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on gpio/for-next]
[also build test WARNING on next-20200622]
[cannot apply to linux/master linus/master v5.8-rc2]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Kent-Gibson/gpio-cdev-add-uAPI-V2/20200623-120634
base:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git for-next

:::::: branch date: 3 hours ago
:::::: commit date: 3 hours ago
config: nios2-randconfig-c023-20200623 (attached as .config)
compiler: nios2-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate

coccinelle warnings: (new ones prefixed by >>)

Quoted 1 line
Quoted 1 line

drivers/gpio/gpiolib-cdev.c:891:13-17: ERROR: reference preceded by free on line 890

# https://github.com/0day-ci/linux/commit/f3b3ae8752adc5ac33dcf83d49b0b02f2d7ef43b
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout f3b3ae8752adc5ac33dcf83d49b0b02f2d7ef43b
vim +891 drivers/gpio/gpiolib-cdev.c

f3b3ae8752adc5a Kent Gibson 2020-06-23  876
f3b3ae8752adc5a Kent Gibson 2020-06-23  877  static void line_free(struct line *line)
f3b3ae8752adc5a Kent Gibson 2020-06-23  878  {
f3b3ae8752adc5a Kent Gibson 2020-06-23  879  	int i;
f3b3ae8752adc5a Kent Gibson 2020-06-23  880
f3b3ae8752adc5a Kent Gibson 2020-06-23  881  	for (i = 0; i < line->num_descs; i++) {
f3b3ae8752adc5a Kent Gibson 2020-06-23  882  		if (line->edets)
f3b3ae8752adc5a Kent Gibson 2020-06-23  883  			edge_detector_stop(&line->edets[i]);
f3b3ae8752adc5a Kent Gibson 2020-06-23  884  		if (line->descs[i])
f3b3ae8752adc5a Kent Gibson 2020-06-23  885  			gpiod_free(line->descs[i]);
f3b3ae8752adc5a Kent Gibson 2020-06-23  886  	}
f3b3ae8752adc5a Kent Gibson 2020-06-23  887  	kfifo_free(&line->events);
f3b3ae8752adc5a Kent Gibson 2020-06-23  888  	kfree(line->label);
f3b3ae8752adc5a Kent Gibson 2020-06-23  889  	kfree(line->edets);
f3b3ae8752adc5a Kent Gibson 2020-06-23 @890  	kfree(line);
f3b3ae8752adc5a Kent Gibson 2020-06-23 @891  	put_device(&line->gdev->dev);
f3b3ae8752adc5a Kent Gibson 2020-06-23  892  }

f3b3ae8752adc5a Kent Gibson 2020-06-23 893

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

#1 lore raw
Quoted 2 lines · Julia Lawall

It looks like the put_device (line 891) should be one line earlier.

Yikes - thanks for that.
I'll be sure to coccinelle my code before submitting from now on.

Cheers,
Kent.