All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@inria.fr>
To: Amit Kumar Mahapatra <amit.kumar-mahapatra@xilinx.com>,
	Michal Simek <monstr@monstr.eu>,
	Naga Sureshkumar Relli <naga.sureshkumar.relli@xilinx.com>,
	Mark Brown <broonie@kernel.org>,
	linux-spi@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, kbuild-all@lists.01.org,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH] spi: spi-zynqmp-gqspi: fix for_each_child.cocci warnings
Date: Mon, 7 Feb 2022 22:30:15 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2202072228170.52266@hadrien> (raw)

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

for_each_available_child_of_node should have of_node_put() before break.

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

Fixes: f0fcd7d14036 ("spi: spi-zynqmp-gqspi: Fix suspend/resume")
CC: Amit Kumar Mahapatra <amit.kumar-mahapatra@xilinx.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://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15
head:   1183ce490adb103e5e569b8ebd74c50c885ddc05
commit: f0fcd7d140361b1f54cfd76afb8c3afc9bf218a5 [857/872] spi: spi-zynqmp-gqspi: Fix suspend/resume
:::::: branch date: 3 days ago
:::::: commit date: 3 days ago

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

 spi-zynqmp-gqspi.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/spi/spi-zynqmp-gqspi.c
+++ b/drivers/spi/spi-zynqmp-gqspi.c
@@ -1395,6 +1395,7 @@ static int zynqmp_qspi_probe(struct plat
 					   &rx_bus_width);
 		if (!ret) {
 			xqspi->rx_bus_width = rx_bus_width;
+			of_node_put(nc);
 			break;
 		}
 	}
@@ -1407,6 +1408,7 @@ static int zynqmp_qspi_probe(struct plat
 					   &tx_bus_width);
 		if (!ret) {
 			xqspi->tx_bus_width = tx_bus_width;
+			of_node_put(nc);
 			break;
 		}
 	}

WARNING: multiple messages have this Message-ID (diff)
From: Julia Lawall <julia.lawall@inria.fr>
To: Amit Kumar Mahapatra <amit.kumar-mahapatra@xilinx.com>,
	 Michal Simek <monstr@monstr.eu>,
	 Naga Sureshkumar Relli <naga.sureshkumar.relli@xilinx.com>,
	 Mark Brown <broonie@kernel.org>,
	linux-spi@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,  kbuild-all@lists.01.org,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH] spi: spi-zynqmp-gqspi: fix for_each_child.cocci warnings
Date: Mon, 7 Feb 2022 22:30:15 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2202072228170.52266@hadrien> (raw)

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

for_each_available_child_of_node should have of_node_put() before break.

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

Fixes: f0fcd7d14036 ("spi: spi-zynqmp-gqspi: Fix suspend/resume")
CC: Amit Kumar Mahapatra <amit.kumar-mahapatra@xilinx.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://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15
head:   1183ce490adb103e5e569b8ebd74c50c885ddc05
commit: f0fcd7d140361b1f54cfd76afb8c3afc9bf218a5 [857/872] spi: spi-zynqmp-gqspi: Fix suspend/resume
:::::: branch date: 3 days ago
:::::: commit date: 3 days ago

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

 spi-zynqmp-gqspi.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/spi/spi-zynqmp-gqspi.c
+++ b/drivers/spi/spi-zynqmp-gqspi.c
@@ -1395,6 +1395,7 @@ static int zynqmp_qspi_probe(struct plat
 					   &rx_bus_width);
 		if (!ret) {
 			xqspi->rx_bus_width = rx_bus_width;
+			of_node_put(nc);
 			break;
 		}
 	}
@@ -1407,6 +1408,7 @@ static int zynqmp_qspi_probe(struct plat
 					   &tx_bus_width);
 		if (!ret) {
 			xqspi->tx_bus_width = tx_bus_width;
+			of_node_put(nc);
 			break;
 		}
 	}

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Julia Lawall <julia.lawall@inria.fr>
To: kbuild-all@lists.01.org
Subject: [PATCH] spi: spi-zynqmp-gqspi: fix for_each_child.cocci warnings
Date: Mon, 07 Feb 2022 22:30:15 +0100	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2202072228170.52266@hadrien> (raw)

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

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

for_each_available_child_of_node should have of_node_put() before break.

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

Fixes: f0fcd7d14036 ("spi: spi-zynqmp-gqspi: Fix suspend/resume")
CC: Amit Kumar Mahapatra <amit.kumar-mahapatra@xilinx.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://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15
head:   1183ce490adb103e5e569b8ebd74c50c885ddc05
commit: f0fcd7d140361b1f54cfd76afb8c3afc9bf218a5 [857/872] spi: spi-zynqmp-gqspi: Fix suspend/resume
:::::: branch date: 3 days ago
:::::: commit date: 3 days ago

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

 spi-zynqmp-gqspi.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/spi/spi-zynqmp-gqspi.c
+++ b/drivers/spi/spi-zynqmp-gqspi.c
@@ -1395,6 +1395,7 @@ static int zynqmp_qspi_probe(struct plat
 					   &rx_bus_width);
 		if (!ret) {
 			xqspi->rx_bus_width = rx_bus_width;
+			of_node_put(nc);
 			break;
 		}
 	}
@@ -1407,6 +1408,7 @@ static int zynqmp_qspi_probe(struct plat
 					   &tx_bus_width);
 		if (!ret) {
 			xqspi->tx_bus_width = tx_bus_width;
+			of_node_put(nc);
 			break;
 		}
 	}

             reply	other threads:[~2022-02-07 21:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-07 21:30 Julia Lawall [this message]
2022-02-07 21:30 ` [PATCH] spi: spi-zynqmp-gqspi: fix for_each_child.cocci warnings Julia Lawall
2022-02-07 21:30 ` Julia Lawall
2022-02-09 13:13 ` Mark Brown
2022-02-09 13:13   ` Mark Brown
2022-02-09 13:13   ` Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2022-02-04 19:10 [xilinx-xlnx:xlnx_rebase_v5.15 857/872] drivers/spi/spi-zynqmp-gqspi.c:1393:1-33: WARNING: Function "for_each_available_child_of_node" should have of_node_put() before break around line 1398 kernel test robot
2022-02-04 19:03 ` [PATCH] spi: spi-zynqmp-gqspi: fix for_each_child.cocci warnings kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.22.394.2202072228170.52266@hadrien \
    --to=julia.lawall@inria.fr \
    --cc=amit.kumar-mahapatra@xilinx.com \
    --cc=broonie@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=monstr@monstr.eu \
    --cc=naga.sureshkumar.relli@xilinx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.