Linux-GPIO Archive on lore.kernel.org
 help / color / Atom feed
* Re: [PATCH 16/22] gpiolib: cdev: add V2 uAPI implementation to parity with V1 (fwd)
@ 2020-06-23 17:11 Julia Lawall
  2020-06-24  2:07 ` Kent Gibson
  0 siblings, 1 reply; 2+ messages in thread
From: Julia Lawall @ 2020-06-23 17:11 UTC (permalink / raw)
  To: Kent Gibson
  Cc: linux-kernel, linux-gpio, bgolaszewski, linus.walleij,
	Kent Gibson, kbuild-all


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

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 <lkp@intel.com>
To: kbuild@lists.01.org
Cc: lkp@intel.com, Julia Lawall <julia.lawall@lip6.fr>
Subject: Re: [PATCH 16/22] gpiolib: cdev: add V2 uAPI implementation to parity
    with V1

CC: kbuild-all@lists.01.org
In-Reply-To: <20200623040107.22270-17-warthog618@gmail.com>
References: <20200623040107.22270-17-warthog618@gmail.com>
TO: Kent Gibson <warthog618@gmail.com>
TO: linux-kernel@vger.kernel.org
TO: linux-gpio@vger.kernel.org
TO: bgolaszewski@baylibre.com
TO: linus.walleij@linaro.org
CC: Kent Gibson <warthog618@gmail.com>

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
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>


coccinelle warnings: (new ones prefixed by >>)

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

[-- Attachment #2: Type: application/gzip, Size: 26841 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 16/22] gpiolib: cdev: add V2 uAPI implementation to parity with V1 (fwd)
  2020-06-23 17:11 [PATCH 16/22] gpiolib: cdev: add V2 uAPI implementation to parity with V1 (fwd) Julia Lawall
@ 2020-06-24  2:07 ` Kent Gibson
  0 siblings, 0 replies; 2+ messages in thread
From: Kent Gibson @ 2020-06-24  2:07 UTC (permalink / raw)
  To: Julia Lawall; +Cc: linux-kernel, linux-gpio, bgolaszewski, linus.walleij

On Tue, Jun 23, 2020 at 07:11:49PM +0200, Julia Lawall wrote:
> 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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-23 17:11 [PATCH 16/22] gpiolib: cdev: add V2 uAPI implementation to parity with V1 (fwd) Julia Lawall
2020-06-24  2:07 ` Kent Gibson

Linux-GPIO Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-gpio/0 linux-gpio/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-gpio linux-gpio/ https://lore.kernel.org/linux-gpio \
		linux-gpio@vger.kernel.org
	public-inbox-index linux-gpio

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-gpio


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git