All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [PATCH] dsa: fix returnvar.cocci warnings
Date: Sun, 11 Jul 2021 22:27:56 +0800	[thread overview]
Message-ID: <20210711142756.GA20200@c3b7951da422> (raw)
In-Reply-To: <202107112258.7gxxyYm4-lkp@intel.com>

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

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Alexander Lobakin <alobakin@pm.me>
CC: Vladimir Oltean <olteanv@gmail.com>
CC: Florian Fainelli <f.fainelli@gmail.com>
CC: Woojung Huh <woojung.huh@microchip.com>
CC: UNGLinuxDriver(a)microchip.com
CC: Andrew Lunn <andrew@lunn.ch>
CC: Vivien Didelot <vivien.didelot@gmail.com>
CC: Jakub Kicinski <kuba@kernel.org>
CC: netdev(a)vger.kernel.org
CC: linux-kernel(a)vger.kernel.org

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

drivers/net/dsa/microchip/ksz_common.c:298:5-8: Unneeded variable: "ret". Return "0" on line 320


 Remove unneeded variable used to store return value.

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

CC: Alexander Lobakin <alobakin@pm.me>
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:   de5540965853e514a85d3b775e9049deb85a2ff3
commit: 227d72063fccb2d19b30fb4197fba478514f7d83 dsa: simplify Kconfig symbols and dependencies
:::::: branch date: 15 hours ago
:::::: commit date: 4 months ago

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

--- a/drivers/net/dsa/microchip/ksz_common.c
+++ b/drivers/net/dsa/microchip/ksz_common.c
@@ -295,7 +295,6 @@ int ksz_port_mdb_del(struct dsa_switch *
 	struct ksz_device *dev = ds->priv;
 	struct alu_struct alu;
 	int index;
-	int ret = 0;
 
 	for (index = 0; index < dev->num_statics; index++) {
 		if (!dev->dev_ops->r_sta_mac_table(dev, index, &alu)) {
@@ -317,7 +316,7 @@ int ksz_port_mdb_del(struct dsa_switch *
 	dev->dev_ops->w_sta_mac_table(dev, index, &alu);
 
 exit:
-	return ret;
+	return 0;
 }
 EXPORT_SYMBOL_GPL(ksz_port_mdb_del);
 

      parent reply	other threads:[~2021-07-11 14:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-11 14:27 drivers/net/dsa/microchip/ksz_common.c:418:3-35: WARNING: Function "for_each_available_child_of_node" should have of_node_put() before return around line 423 kernel test robot
2021-07-11 14:27 ` [PATCH] dsa: fix for_each_child.cocci warnings kernel test robot
2021-07-11 14:27 ` kernel test robot [this message]

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=20210711142756.GA20200@c3b7951da422 \
    --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.