From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [PATCH] of: property: fix returnvar.cocci warnings
Date: Thu, 10 Dec 2020 10:39:14 +0800 [thread overview]
Message-ID: <20201210023914.GA29723@d77c63856d78> (raw)
In-Reply-To: <202012101059.2noUZgz7-lkp@intel.com>
[-- Attachment #1: Type: text/plain, Size: 1842 bytes --]
CC: kbuild-all(a)lists.01.org
CC: devel(a)driverdev.osuosl.org
TO: Saravana Kannan <saravanak@google.com>
CC: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
CC: Rob Herring <robh+dt@kernel.org>
CC: Frank Rowand <frowand.list@gmail.com>
CC: devicetree(a)vger.kernel.org
CC: linux-kernel(a)vger.kernel.org
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
Fixes: 8a06d1ea0617 ("of: property: Update implementation of add_links() to create fwnode links")
CC: Saravana Kannan <saravanak@google.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/gregkh/driver-core.git driver-core-testing
head: 3577afb0052fca65e67efdfc8e0859bb7bac87a6
commit: 8a06d1ea061739dd2e60aff3d64a58892e4031cf [22/33] of: property: Update implementation of add_links() to create fwnode links
:::::: branch date: 7 hours ago
:::::: commit date: 8 hours 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)
next prev parent reply other threads:[~2020-12-10 2:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
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 ` [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=20201210023914.GA29723@d77c63856d78 \
--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.