All of lore.kernel.org
 help / color / mirror / Atom feed
* drivers/gpu/drm/mcde/mcde_dsi.c:1111:1-33: WARNING: Function "for_each_available_child_of_node" should have of_node_put() before return around line 1121.
@ 2021-05-11 13:32 kernel test robot
  2021-05-11 13:32 ` [PATCH] lib: fix for_each_child.cocci warnings kernel test robot
  0 siblings, 1 reply; 8+ messages in thread
From: kernel test robot @ 2021-05-11 13:32 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Julian Braha <julianbraha@gmail.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>

Hi Julian,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   1140ab592e2ebf8153d2b322604031a8868ce7a5
commit: 7d37cb2c912dc5c25ffac784a4f9b98c06c6bd08 lib: fix kconfig dependency on ARCH_WANT_FRAME_POINTERS
date:   5 weeks ago
:::::: branch date: 15 hours ago
:::::: commit date: 5 weeks ago
config: csky-randconfig-c004-20210511 (attached as .config)
compiler: csky-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>


cocci warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/mcde/mcde_dsi.c:1111:1-33: WARNING: Function "for_each_available_child_of_node" should have of_node_put() before return around line 1121.

Please review and possibly fold the followup patch.

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

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

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

* [PATCH] lib: fix for_each_child.cocci warnings
  2021-05-11 13:32 drivers/gpu/drm/mcde/mcde_dsi.c:1111:1-33: WARNING: Function "for_each_available_child_of_node" should have of_node_put() before return around line 1121 kernel test robot
@ 2021-05-11 13:32 ` kernel test robot
  0 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2021-05-11 13:32 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Julian Braha <julianbraha@gmail.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>

From: kernel test robot <lkp@intel.com>

drivers/gpu/drm/mcde/mcde_dsi.c:1111:1-33: WARNING: Function "for_each_available_child_of_node" should have of_node_put() before return around line 1121.


Semantic patch information:
 False positives can be due to function calls within the for_each
 loop that may encapsulate an of_node_put.

Generated by: scripts/coccinelle/iterators/for_each_child.cocci

Fixes: 7d37cb2c912d ("lib: fix kconfig dependency on ARCH_WANT_FRAME_POINTERS")
CC: Julian Braha <julianbraha@gmail.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   1140ab592e2ebf8153d2b322604031a8868ce7a5
commit: 7d37cb2c912dc5c25ffac784a4f9b98c06c6bd08 lib: fix kconfig dependency on ARCH_WANT_FRAME_POINTERS
:::::: branch date: 15 hours ago
:::::: commit date: 5 weeks ago

Please take the patch only if it's a positive warning. Thanks!

 mcde_dsi.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/gpu/drm/mcde/mcde_dsi.c
+++ b/drivers/gpu/drm/mcde/mcde_dsi.c
@@ -1118,6 +1118,7 @@ static int mcde_dsi_bind(struct device *
 			bridge = of_drm_find_bridge(child);
 			if (!bridge) {
 				dev_err(dev, "failed to find bridge\n");
+				of_node_put(child);
 				return -EINVAL;
 			}
 		}

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

* Re: [PATCH] lib: fix for_each_child.cocci warnings
  2021-05-11 20:46 ` Julia Lawall
  (?)
@ 2021-05-17 22:08   ` Linus Walleij
  -1 siblings, 0 replies; 8+ messages in thread
From: Linus Walleij @ 2021-05-17 22:08 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Julian Braha, Andrew Morton, Linux Memory Management List,
	linux-kernel, kbuild-all

On Tue, May 11, 2021 at 10:46 PM Julia Lawall <julia.lawall@inria.fr> wrote:

> From: kernel test robot <lkp@intel.com>
>
> For_each_available_child_of_node should have of_node_put() before return
> around line 1121.
>
> Generated by: scripts/coccinelle/iterators/for_each_child.cocci
>
> Fixes: 7d37cb2c912d ("lib: fix kconfig dependency on ARCH_WANT_FRAME_POINTERS")
> CC: Julian Braha <julianbraha@gmail.com>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Julia Lawall <julia.lawall@inria.fr>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Shall I apply it to the DRM tree or do you plan on funneling it
some other way?

Yours,
Linus Walleij

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

* Re: [PATCH] lib: fix for_each_child.cocci warnings
@ 2021-05-17 22:08   ` Linus Walleij
  0 siblings, 0 replies; 8+ messages in thread
From: Linus Walleij @ 2021-05-17 22:08 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Julian Braha, Andrew Morton, Linux Memory Management List,
	linux-kernel, kbuild-all

On Tue, May 11, 2021 at 10:46 PM Julia Lawall <julia.lawall@inria.fr> wrote:

> From: kernel test robot <lkp@intel.com>
>
> For_each_available_child_of_node should have of_node_put() before return
> around line 1121.
>
> Generated by: scripts/coccinelle/iterators/for_each_child.cocci
>
> Fixes: 7d37cb2c912d ("lib: fix kconfig dependency on ARCH_WANT_FRAME_POINTERS")
> CC: Julian Braha <julianbraha@gmail.com>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Julia Lawall <julia.lawall@inria.fr>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Shall I apply it to the DRM tree or do you plan on funneling it
some other way?

Yours,
Linus Walleij


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

* Re: [PATCH] lib: fix for_each_child.cocci warnings
@ 2021-05-17 22:08   ` Linus Walleij
  0 siblings, 0 replies; 8+ messages in thread
From: Linus Walleij @ 2021-05-17 22:08 UTC (permalink / raw)
  To: kbuild-all

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

On Tue, May 11, 2021 at 10:46 PM Julia Lawall <julia.lawall@inria.fr> wrote:

> From: kernel test robot <lkp@intel.com>
>
> For_each_available_child_of_node should have of_node_put() before return
> around line 1121.
>
> Generated by: scripts/coccinelle/iterators/for_each_child.cocci
>
> Fixes: 7d37cb2c912d ("lib: fix kconfig dependency on ARCH_WANT_FRAME_POINTERS")
> CC: Julian Braha <julianbraha@gmail.com>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Julia Lawall <julia.lawall@inria.fr>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Shall I apply it to the DRM tree or do you plan on funneling it
some other way?

Yours,
Linus Walleij

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

* [PATCH] lib: fix for_each_child.cocci warnings
@ 2021-05-11 20:46 ` Julia Lawall
  0 siblings, 0 replies; 8+ messages in thread
From: Julia Lawall @ 2021-05-11 20:46 UTC (permalink / raw)
  To: Julian Braha
  Cc: Andrew Morton, Linux Memory Management List, linux-kernel, kbuild-all

From: kernel test robot <lkp@intel.com>

For_each_available_child_of_node should have of_node_put() before return
around line 1121.

Generated by: scripts/coccinelle/iterators/for_each_child.cocci

Fixes: 7d37cb2c912d ("lib: fix kconfig dependency on ARCH_WANT_FRAME_POINTERS")
CC: Julian Braha <julianbraha@gmail.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   1140ab592e2ebf8153d2b322604031a8868ce7a5
commit: 7d37cb2c912dc5c25ffac784a4f9b98c06c6bd08 lib: fix kconfig dependency on ARCH_WANT_FRAME_POINTERS
:::::: branch date: 15 hours ago
:::::: commit date: 5 weeks ago

 mcde_dsi.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/gpu/drm/mcde/mcde_dsi.c
+++ b/drivers/gpu/drm/mcde/mcde_dsi.c
@@ -1118,6 +1118,7 @@ static int mcde_dsi_bind(struct device *
 			bridge = of_drm_find_bridge(child);
 			if (!bridge) {
 				dev_err(dev, "failed to find bridge\n");
+				of_node_put(child);
 				return -EINVAL;
 			}
 		}

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

* [PATCH] lib: fix for_each_child.cocci warnings
@ 2021-05-11 20:46 ` Julia Lawall
  0 siblings, 0 replies; 8+ messages in thread
From: Julia Lawall @ 2021-05-11 20:46 UTC (permalink / raw)
  To: Julian Braha
  Cc: Andrew Morton, Linux Memory Management List, linux-kernel, kbuild-all

From: kernel test robot <lkp@intel.com>

For_each_available_child_of_node should have of_node_put() before return
around line 1121.

Generated by: scripts/coccinelle/iterators/for_each_child.cocci

Fixes: 7d37cb2c912d ("lib: fix kconfig dependency on ARCH_WANT_FRAME_POINTERS")
CC: Julian Braha <julianbraha@gmail.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   1140ab592e2ebf8153d2b322604031a8868ce7a5
commit: 7d37cb2c912dc5c25ffac784a4f9b98c06c6bd08 lib: fix kconfig dependency on ARCH_WANT_FRAME_POINTERS
:::::: branch date: 15 hours ago
:::::: commit date: 5 weeks ago

 mcde_dsi.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/gpu/drm/mcde/mcde_dsi.c
+++ b/drivers/gpu/drm/mcde/mcde_dsi.c
@@ -1118,6 +1118,7 @@ static int mcde_dsi_bind(struct device *
 			bridge = of_drm_find_bridge(child);
 			if (!bridge) {
 				dev_err(dev, "failed to find bridge\n");
+				of_node_put(child);
 				return -EINVAL;
 			}
 		}


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

* [PATCH] lib: fix for_each_child.cocci warnings
@ 2021-05-11 20:46 ` Julia Lawall
  0 siblings, 0 replies; 8+ messages in thread
From: Julia Lawall @ 2021-05-11 20:46 UTC (permalink / raw)
  To: kbuild-all

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

From: kernel test robot <lkp@intel.com>

For_each_available_child_of_node should have of_node_put() before return
around line 1121.

Generated by: scripts/coccinelle/iterators/for_each_child.cocci

Fixes: 7d37cb2c912d ("lib: fix kconfig dependency on ARCH_WANT_FRAME_POINTERS")
CC: Julian Braha <julianbraha@gmail.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   1140ab592e2ebf8153d2b322604031a8868ce7a5
commit: 7d37cb2c912dc5c25ffac784a4f9b98c06c6bd08 lib: fix kconfig dependency on ARCH_WANT_FRAME_POINTERS
:::::: branch date: 15 hours ago
:::::: commit date: 5 weeks ago

 mcde_dsi.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/gpu/drm/mcde/mcde_dsi.c
+++ b/drivers/gpu/drm/mcde/mcde_dsi.c
@@ -1118,6 +1118,7 @@ static int mcde_dsi_bind(struct device *
 			bridge = of_drm_find_bridge(child);
 			if (!bridge) {
 				dev_err(dev, "failed to find bridge\n");
+				of_node_put(child);
 				return -EINVAL;
 			}
 		}

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

end of thread, other threads:[~2021-05-17 22:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-11 13:32 drivers/gpu/drm/mcde/mcde_dsi.c:1111:1-33: WARNING: Function "for_each_available_child_of_node" should have of_node_put() before return around line 1121 kernel test robot
2021-05-11 13:32 ` [PATCH] lib: fix for_each_child.cocci warnings kernel test robot
2021-05-11 20:46 Julia Lawall
2021-05-11 20:46 ` Julia Lawall
2021-05-11 20:46 ` Julia Lawall
2021-05-17 22:08 ` Linus Walleij
2021-05-17 22:08   ` Linus Walleij
2021-05-17 22:08   ` Linus Walleij

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.