All of lore.kernel.org
 help / color / mirror / Atom feed
* sound/soc/bcm/cygnus-ssp.c:1346:1-33: WARNING: Function "for_each_available_child_of_node" should have of_node_put() before return around line 1352.
@ 2021-03-27 14:34 kernel test robot
  2021-03-27 14:34 ` [PATCH] coccinelle: iterators: fix for_each_child.cocci warnings kernel test robot
  0 siblings, 1 reply; 7+ messages in thread
From: kernel test robot @ 2021-03-27 14:34 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Sumera Priyadarsini <sylphrenadin@gmail.com>
CC: Julia Lawall <Julia.Lawall@lip6.fr>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   0f4498cef9f5cd18d7c6639a2a902ec1edc5be4e
commit: 82c2d81361ecd142a54e84a9da1e287113314a4f coccinelle: iterators: Add for_each_child.cocci script
date:   5 months ago
:::::: branch date: 19 hours ago
:::::: commit date: 5 months ago
config: riscv-allyesconfig (attached as .config)
compiler: riscv64-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 >>)
>> sound/soc/bcm/cygnus-ssp.c:1346:1-33: WARNING: Function "for_each_available_child_of_node" should have of_node_put() before return around line 1352.

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: 66368 bytes --]

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

* [PATCH] coccinelle: iterators: fix for_each_child.cocci warnings
  2021-03-27 14:34 sound/soc/bcm/cygnus-ssp.c:1346:1-33: WARNING: Function "for_each_available_child_of_node" should have of_node_put() before return around line 1352 kernel test robot
@ 2021-03-27 14:34 ` kernel test robot
  0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2021-03-27 14:34 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Sumera Priyadarsini <sylphrenadin@gmail.com>
CC: Julia Lawall <Julia.Lawall@lip6.fr>
CC: Liam Girdwood <lgirdwood@gmail.com>
CC: Mark Brown <broonie@kernel.org>
CC: Jaroslav Kysela <perex@perex.cz>
CC: Takashi Iwai <tiwai@suse.com>
CC: Ray Jui <rjui@broadcom.com>
CC: Scott Branden <sbranden@broadcom.com>
CC: bcm-kernel-feedback-list(a)broadcom.com
CC: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

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

sound/soc/bcm/cygnus-ssp.c:1346:1-33: WARNING: Function "for_each_available_child_of_node" should have of_node_put() before return around line 1352.


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: 82c2d81361ec ("coccinelle: iterators: Add for_each_child.cocci script")
CC: Sumera Priyadarsini <sylphrenadin@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:   0f4498cef9f5cd18d7c6639a2a902ec1edc5be4e
commit: 82c2d81361ecd142a54e84a9da1e287113314a4f coccinelle: iterators: Add for_each_child.cocci script
:::::: branch date: 19 hours ago
:::::: commit date: 5 months ago

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

 cygnus-ssp.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/sound/soc/bcm/cygnus-ssp.c
+++ b/sound/soc/bcm/cygnus-ssp.c
@@ -1348,8 +1348,10 @@ static int cygnus_ssp_probe(struct platf
 					&cygnus_ssp_dai[active_port_count]);
 
 		/* negative is err, 0 is active and good, 1 is disabled */
-		if (err < 0)
+		if (err < 0) {
+			of_node_put(child_node);
 			return err;
+		}
 		else if (!err) {
 			dev_dbg(dev, "Activating DAI: %s\n",
 				cygnus_ssp_dai[active_port_count].name);

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

* [PATCH] coccinelle: iterators: fix for_each_child.cocci warnings
  2021-08-03  9:43 arch/powerpc/kexec/core_64.c:54:1-22: WARNING: Function "for_each_node_by_type" should have of_node_put() before return around line 68 kernel test robot
@ 2021-08-03  9:43 ` kernel test robot
  0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2021-08-03  9:43 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Sumera Priyadarsini <sylphrenadin@gmail.com>
CC: Julia Lawall <Julia.Lawall@lip6.fr>
CC: Michael Ellerman <mpe@ellerman.id.au>
CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
CC: Paul Mackerras <paulus@samba.org>
CC: linuxppc-dev(a)lists.ozlabs.org
CC: linux-kernel(a)vger.kernel.org

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

arch/powerpc/kexec/core_64.c:54:1-22: WARNING: Function "for_each_node_by_type" should have of_node_put() before return around line 68.


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

CC: Sumera Priyadarsini <sylphrenadin@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:   c500bee1c5b2f1d59b1081ac879d73268ab0ff17
commit: 82c2d81361ecd142a54e84a9da1e287113314a4f coccinelle: iterators: Add for_each_child.cocci script
:::::: branch date: 34 hours ago
:::::: commit date: 10 months ago

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

 core_64.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/arch/powerpc/kexec/core_64.c
+++ b/arch/powerpc/kexec/core_64.c
@@ -64,8 +64,10 @@ int default_machine_kexec_prepare(struct
 			begin = image->segment[i].mem;
 			end = begin + image->segment[i].memsz;
 
-			if ((begin < high) && (end > low))
+			if ((begin < high) && (end > low)) {
+				of_node_put(node);
 				return -ETXTBSY;
+			}
 		}
 	}
 

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

* [PATCH] coccinelle: iterators: fix for_each_child.cocci warnings
  2021-06-23 14:01 drivers/phy/rockchip/phy-rockchip-inno-usb2.c:1149:1-33: WARNING: Function "for_each_available_child_of_node" should have of_node_put() before break around line 1184 kernel test robot
@ 2021-06-23 14:02 ` kernel test robot
  0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2021-06-23 14:02 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Sumera Priyadarsini <sylphrenadin@gmail.com>
CC: Julia Lawall <Julia.Lawall@lip6.fr>
CC: Kishon Vijay Abraham I <kishon@ti.com>
CC: Vinod Koul <vkoul@kernel.org>
CC: Heiko Stuebner <heiko@sntech.de>
CC: linux-kernel(a)vger.kernel.org
CC: linux-arm-kernel(a)lists.infradead.org
CC: linux-rockchip(a)lists.infradead.org

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

drivers/phy/rockchip/phy-rockchip-inno-usb2.c:1149:1-33: WARNING: Function "for_each_available_child_of_node" should have of_node_put() before break around line 1184.


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: 82c2d81361ec ("coccinelle: iterators: Add for_each_child.cocci script")
CC: Sumera Priyadarsini <sylphrenadin@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:   0c18f29aae7ce3dadd26d8ee3505d07cc982df75
commit: 82c2d81361ecd142a54e84a9da1e287113314a4f coccinelle: iterators: Add for_each_child.cocci script
:::::: branch date: 20 hours ago
:::::: commit date: 8 months ago

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

 phy-rockchip-inno-usb2.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
+++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
@@ -1180,8 +1180,10 @@ static int rockchip_usb2phy_probe(struct
 
 next_child:
 		/* to prevent out of boundary */
-		if (++index >= rphy->phy_cfg->num_ports)
+		if (++index >= rphy->phy_cfg->num_ports) {
+			of_node_put(child_np);
 			break;
+		}
 	}
 
 	provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);

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

* [PATCH] coccinelle: iterators: fix for_each_child.cocci warnings
  2021-03-21  7:14 drivers/of/overlay.c:788:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before goto around lines 799 kernel test robot
@ 2021-03-21  7:14 ` kernel test robot
  0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2021-03-21  7:14 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Sumera Priyadarsini <sylphrenadin@gmail.com>
CC: Julia Lawall <Julia.Lawall@lip6.fr>
CC: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
CC: Frank Rowand <frowand.list@gmail.com>
CC: Rob Herring <robh+dt@kernel.org>
CC: devicetree(a)vger.kernel.org
CC: linux-kernel(a)vger.kernel.org

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

drivers/of/overlay.c:788:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before goto around lines 799.


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: 82c2d81361ec ("coccinelle: iterators: Add for_each_child.cocci script")
CC: Sumera Priyadarsini <sylphrenadin@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:   812da4d39463a060738008a46cfc9f775e4bfcf6
commit: 82c2d81361ecd142a54e84a9da1e287113314a4f coccinelle: iterators: Add for_each_child.cocci script
:::::: branch date: 13 hours ago
:::::: commit date: 5 months ago

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

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

--- a/drivers/of/overlay.c
+++ b/drivers/of/overlay.c
@@ -796,6 +796,7 @@ static int init_overlay_changeset(struct
 		if (!fragment->target) {
 			of_node_put(fragment->overlay);
 			ret = -EINVAL;
+			of_node_put(node);
 			goto err_free_fragments;
 		}
 

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

* [PATCH] coccinelle: iterators: fix for_each_child.cocci warnings
  2021-01-20 14:17 drivers/usb/gadget/udc/aspeed-vhub/hub.c:982:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before break around line 1003 kernel test robot
@ 2021-01-20 14:17 ` kernel test robot
  0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2021-01-20 14:17 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Sumera Priyadarsini <sylphrenadin@gmail.com>
CC: Julia Lawall <Julia.Lawall@lip6.fr>
CC: Felipe Balbi <balbi@kernel.org>
CC: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
CC: Joel Stanley <joel@jms.id.au>
CC: Andrew Jeffery <andrew@aj.id.au>
CC: Tao Ren <rentao.bupt@gmail.com>
CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
CC: linux-usb(a)vger.kernel.org
CC: linux-arm-kernel(a)lists.infradead.org

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

drivers/usb/gadget/udc/aspeed-vhub/hub.c:982:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before break around line 1003.


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: 82c2d81361ec ("coccinelle: iterators: Add for_each_child.cocci script")
CC: Sumera Priyadarsini <sylphrenadin@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:   45dfb8a5659ad286c28fa59008271dbc4e5e3f2d
commit: 82c2d81361ecd142a54e84a9da1e287113314a4f coccinelle: iterators: Add for_each_child.cocci script
:::::: branch date: 17 hours ago
:::::: commit date: 3 months ago

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

 hub.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/drivers/usb/gadget/udc/aspeed-vhub/hub.c
+++ b/drivers/usb/gadget/udc/aspeed-vhub/hub.c
@@ -999,8 +999,10 @@ static int ast_vhub_of_parse_str_desc(st
 		str_array[offset].s = NULL;
 
 		ret = ast_vhub_str_alloc_add(vhub, &lang_str);
-		if (ret)
+		if (ret) {
+			of_node_put(child);
 			break;
+		}
 	}
 
 	return ret;

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

* [PATCH] coccinelle: iterators: fix for_each_child.cocci warnings
  2020-11-22 20:01 net/dsa/dsa2.c:738:1-33: WARNING: Function "for_each_available_child_of_node" should have of_node_put() before goto around lines 741 kernel test robot
@ 2020-11-22 20:01 ` kernel test robot
  0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2020-11-22 20:01 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Sumera Priyadarsini <sylphrenadin@gmail.com>
CC: Julia Lawall <Julia.Lawall@lip6.fr>
CC: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
CC: Frank Rowand <frowand.list@gmail.com>
CC: Rob Herring <robh+dt@kernel.org>
CC: devicetree(a)vger.kernel.org
CC: linux-kernel(a)vger.kernel.org

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

drivers/of/overlay.c:788:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before goto around lines 799.


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: 82c2d81361ec ("coccinelle: iterators: Add for_each_child.cocci script")
CC: Sumera Priyadarsini <sylphrenadin@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:   a349e4c659609fd20e4beea89e5c4a4038e33a95
commit: 82c2d81361ecd142a54e84a9da1e287113314a4f coccinelle: iterators: Add for_each_child.cocci script
:::::: branch date: 25 hours ago
:::::: commit date: 5 weeks ago

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

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

--- a/drivers/of/overlay.c
+++ b/drivers/of/overlay.c
@@ -796,6 +796,7 @@ static int init_overlay_changeset(struct
 		if (!fragment->target) {
 			of_node_put(fragment->overlay);
 			ret = -EINVAL;
+			of_node_put(node);
 			goto err_free_fragments;
 		}
 

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

end of thread, other threads:[~2021-08-03  9:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-27 14:34 sound/soc/bcm/cygnus-ssp.c:1346:1-33: WARNING: Function "for_each_available_child_of_node" should have of_node_put() before return around line 1352 kernel test robot
2021-03-27 14:34 ` [PATCH] coccinelle: iterators: fix for_each_child.cocci warnings kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2021-08-03  9:43 arch/powerpc/kexec/core_64.c:54:1-22: WARNING: Function "for_each_node_by_type" should have of_node_put() before return around line 68 kernel test robot
2021-08-03  9:43 ` [PATCH] coccinelle: iterators: fix for_each_child.cocci warnings kernel test robot
2021-06-23 14:01 drivers/phy/rockchip/phy-rockchip-inno-usb2.c:1149:1-33: WARNING: Function "for_each_available_child_of_node" should have of_node_put() before break around line 1184 kernel test robot
2021-06-23 14:02 ` [PATCH] coccinelle: iterators: fix for_each_child.cocci warnings kernel test robot
2021-03-21  7:14 drivers/of/overlay.c:788:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before goto around lines 799 kernel test robot
2021-03-21  7:14 ` [PATCH] coccinelle: iterators: fix for_each_child.cocci warnings kernel test robot
2021-01-20 14:17 drivers/usb/gadget/udc/aspeed-vhub/hub.c:982:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before break around line 1003 kernel test robot
2021-01-20 14:17 ` [PATCH] coccinelle: iterators: fix for_each_child.cocci warnings kernel test robot
2020-11-22 20:01 net/dsa/dsa2.c:738:1-33: WARNING: Function "for_each_available_child_of_node" should have of_node_put() before goto around lines 741 kernel test robot
2020-11-22 20:01 ` [PATCH] coccinelle: iterators: fix for_each_child.cocci warnings kernel test robot

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.