All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [PATCH] of: property: fix returnvar.cocci warnings
Date: Tue, 10 Nov 2020 17:45:30 +0800	[thread overview]
Message-ID: <20201110094530.GA29367@22c2fd75c0d2> (raw)
In-Reply-To: <202011101757.YlgqZxJL-lkp@intel.com>

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

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20201104232356.4038506-16-saravanak@google.com>
References: <20201104232356.4038506-16-saravanak@google.com>
TO: Saravana Kannan <saravanak@google.com>
TO: "Rafael J. Wysocki" <rjw@rjwysocki.net>
TO: Len Brown <lenb@kernel.org>
TO: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
TO: Ard Biesheuvel <ardb@kernel.org>
TO: Rob Herring <robh+dt@kernel.org>
TO: Frank Rowand <frowand.list@gmail.com>
TO: Marc Zyngier <maz@kernel.org>
TO: Thomas Gleixner <tglx@linutronix.de>
CC: Saravana Kannan <saravanak@google.com>
CC: Tomi Valkeinen <tomi.valkeinen@ti.com>

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

drivers/of/property.c:1331:5-8: Unneeded variable: "ret". Return "0" on line 1343


 Remove unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

CC: Saravana Kannan <saravanak@google.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

url:    https://github.com/0day-ci/linux/commits/Saravana-Kannan/Refactor-fw_devlink-to-significantly-improve-boot-time/20201105-072804
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git 3cea11cd5e3b00d91caf0b4730194039b45c5891
:::::: branch date: 5 days ago
:::::: commit date: 5 days ago

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

 property.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/of/property.c
+++ b/drivers/of/property.c
@@ -1328,7 +1328,6 @@ static int of_link_property(struct devic
 	const struct supplier_bindings *s = of_supplier_bindings;
 	unsigned int i = 0;
 	bool matched = false;
-	int ret = 0;
 
 	/* Do not stop at first failed link, link all available suppliers. */
 	while (!matched && s->parse_prop) {
@@ -1340,7 +1339,7 @@ static int of_link_property(struct devic
 		}
 		s++;
 	}
-	return ret;
+	return 0;
 }
 
 static int of_fwnode_add_links(struct fwnode_handle *fwnode,

  reply	other threads:[~2020-11-10  9:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-10  9:45 [PATCH v1 15/18] of: property: Update implementation of add_links() to create fwnode links kernel test robot
2020-11-10  9:45 ` kernel test robot [this message]
2020-12-10  2:39 [driver-core:driver-core-testing 22/33] drivers/of/property.c:1331:5-8: Unneeded variable: "ret". Return "0" on line 1343 kernel test robot
2020-12-10  2:39 ` [PATCH] of: property: fix returnvar.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=20201110094530.GA29367@22c2fd75c0d2 \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /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.