From: <zhang.songyi@zte.com.cn>
To: <snelson@pensando.io>
Cc: <drivers@pensando.io>, <davem@davemloft.net>,
<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
<brett@pensando.io>, <mohamed@pensando.io>,
<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<zhang.songyi@zte.com.cn>, <jiang.xuexin@zte.com.cn>,
<xue.zhihong@zte.com.cn>
Subject: [PATCH linux-next] ionic: remove redundant ret variable
Date: Wed, 2 Nov 2022 21:48:20 +0800 (CST) [thread overview]
Message-ID: <202211022148203360503@zte.com.cn> (raw)
From 06579895d9e3f6441fa30d52e3b585b2015c7e2e Mon Sep 17 00:00:00 2001
From: zhang songyi <zhang.songyi@zte.com.cn>
Date: Wed, 2 Nov 2022 20:57:40 +0800
Subject: [PATCH linux-next] ionic: remove redundant ret variable
Return value from ionic_set_features() directly instead of taking this in
another redundant variable.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: zhang songyi <zhang.songyi@zte.com.cn>
---
drivers/net/ethernet/pensando/ionic/ionic_lif.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
index 4dd16c487f2b..a68d748502fd 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
@@ -1557,14 +1557,11 @@ static int ionic_set_features(struct net_device *netdev,
netdev_features_t features)
{
struct ionic_lif *lif = netdev_priv(netdev);
- int err;
netdev_dbg(netdev, "%s: lif->features=0x%08llx new_features=0x%08llx\n",
__func__, (u64)lif->netdev->features, (u64)features);
- err = ionic_set_nic_features(lif, features);
-
- return err;
+ return ionic_set_nic_features(lif, features);
}
static int ionic_set_attr_mac(struct ionic_lif *lif, u8 *mac)
--
2.15.2
next reply other threads:[~2022-11-02 13:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-02 13:48 zhang.songyi [this message]
2022-11-02 16:07 ` [PATCH linux-next] ionic: remove redundant ret variable Shannon Nelson
2022-11-04 3:50 ` Jakub Kicinski
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=202211022148203360503@zte.com.cn \
--to=zhang.songyi@zte.com.cn \
--cc=brett@pensando.io \
--cc=davem@davemloft.net \
--cc=drivers@pensando.io \
--cc=edumazet@google.com \
--cc=jiang.xuexin@zte.com.cn \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mohamed@pensando.io \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=snelson@pensando.io \
--cc=xue.zhihong@zte.com.cn \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).