Skip to contentSkip to conversation

drm: fix device_node_continue.cocci warnings (fwd)

PATCH Applied Julia Lawall 2 participants 3 messages Jun 12, 2022 – Jun 24, 2022

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm: fix device_node_continue.cocci warnings (fwd)

The of_node_put does not seem to be needed. Note that there is none at the preceeding continues.

julia

---------- Forwarded message ----------
Date: Sat, 11 Jun 2022 06:02:45 +0800
From: kernel test robot <[email protected]>
To: kbuild(a)lists.01.org
Cc: lkp(a)intel.com, Julia Lawall <[email protected]>
Subject: [PATCH] drm: fix device_node_continue.cocci warnings

CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: Linux Memory Management List <[email protected]>
TO: Paul Kocialkowski <[email protected]>
CC: Maxime Ripard <[email protected]>
CC: David Airlie <[email protected]>
CC: Daniel Vetter <[email protected]>
CC: dri-devel(a)lists.freedesktop.org
CC: linux-kernel(a)vger.kernel.org

From: kernel test robot <[email protected]>

drivers/gpu/drm/logicvc/logicvc_layer.c:616:2-13: ERROR: probable double put.

Device node iterators put the previous value of the index variable, so an explicit put causes a double put.

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

---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   6d0c806803170f120f8cb97b321de7bd89d3a791
commit: efeeaefe9be56e8ae5e5b4e9ff6d2275ec977ec5 [2027/2566] drm: Add support for the LogiCVC display controller

:::::: branch date: 17 hours ago
:::::: commit date: 31 hours ago

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

 drivers/gpu/drm/logicvc/logicvc_layer.c |    2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/logicvc/logicvc_layer.c +0 -2
@@ -612,8 +612,6 @@ int logicvc_layers_init(struct logicvc_d
 		ret = logicvc_layer_init(logicvc, layer_node, index);
 		if (ret)
 			goto error;
-
-		of_node_put(layer_node);
 	}
 
 	of_node_put(layers_node);
#1 lore raw

Hi Julia,

Quoted 2 lines · Julia Lawall

The of_node_put does not seem to be needed. Note that there is none at the preceeding continues.

That looks like a correct fix, thanks!

Paul

Quoted 54 lines

julia

---------- Forwarded message ----------
Date: Sat, 11 Jun 2022 06:02:45 +0800
From: kernel test robot <[email protected]>
To: kbuild(a)lists.01.org
Cc: lkp(a)intel.com, Julia Lawall <[email protected]>
Subject: [PATCH] drm: fix device_node_continue.cocci warnings

CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: Linux Memory Management List <[email protected]>
TO: Paul Kocialkowski <[email protected]>
CC: Maxime Ripard <[email protected]>
CC: David Airlie <[email protected]>
CC: Daniel Vetter <[email protected]>
CC: dri-devel(a)lists.freedesktop.org
CC: linux-kernel(a)vger.kernel.org

From: kernel test robot <[email protected]>

drivers/gpu/drm/logicvc/logicvc_layer.c:616:2-13: ERROR: probable double put.

Device node iterators put the previous value of the index variable, so an explicit put causes a double put.

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

---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   6d0c806803170f120f8cb97b321de7bd89d3a791
commit: efeeaefe9be56e8ae5e5b4e9ff6d2275ec977ec5 [2027/2566] drm: Add support for the LogiCVC display controller

:::::: branch date: 17 hours ago
:::::: commit date: 31 hours ago

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

 drivers/gpu/drm/logicvc/logicvc_layer.c |    2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/logicvc/logicvc_layer.c +0 -2
@@ -612,8 +612,6 @@ int logicvc_layers_init(struct logicvc_d
 		ret = logicvc_layer_init(logicvc, layer_node, index);
 		if (ret)
 			goto error;
-
-		of_node_put(layer_node);
 	}
 
 	of_node_put(layers_node);
Signature · 3 lines
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
#2 lore raw

Hi,

Quoted 7 lines · Paul Kocialkowski

Hi Julia,

Quoted 2 lines · Julia Lawall

The of_node_put does not seem to be needed. Note that there is none at the preceeding continues.

That looks like a correct fix, thanks!

Pushed to drm-misc-next, thanks!

Paul

Quoted 59 lines
Quoted 54 lines

julia

---------- Forwarded message ----------
Date: Sat, 11 Jun 2022 06:02:45 +0800
From: kernel test robot <[email protected]>
To: kbuild(a)lists.01.org
Cc: lkp(a)intel.com, Julia Lawall <[email protected]>
Subject: [PATCH] drm: fix device_node_continue.cocci warnings

CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: Linux Memory Management List <[email protected]>
TO: Paul Kocialkowski <[email protected]>
CC: Maxime Ripard <[email protected]>
CC: David Airlie <[email protected]>
CC: Daniel Vetter <[email protected]>
CC: dri-devel(a)lists.freedesktop.org
CC: linux-kernel(a)vger.kernel.org

From: kernel test robot <[email protected]>

drivers/gpu/drm/logicvc/logicvc_layer.c:616:2-13: ERROR: probable double put.

Device node iterators put the previous value of the index variable, so an explicit put causes a double put.

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

---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   6d0c806803170f120f8cb97b321de7bd89d3a791
commit: efeeaefe9be56e8ae5e5b4e9ff6d2275ec977ec5 [2027/2566] drm: Add support for the LogiCVC display controller

:::::: branch date: 17 hours ago
:::::: commit date: 31 hours ago

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

 drivers/gpu/drm/logicvc/logicvc_layer.c |    2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/logicvc/logicvc_layer.c +0 -2
@@ -612,8 +612,6 @@ int logicvc_layers_init(struct logicvc_d
 		ret = logicvc_layer_init(logicvc, layer_node, index);
 		if (ret)
 			goto error;
-
-		of_node_put(layer_node);
 	}
 
 	of_node_put(layers_node);
Signature · 3 lines
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
Signature · 3 lines
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com