Skip to contentSkip to conversation

ionic: remove redundant ret variable

PATCH In review [email protected] 3 participants 3 messages Nov 2, 2022 – Nov 4, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ionic: remove redundant ret variable

From 06579895d9e3f6441fa30d52e3b585b2015c7e2e Mon Sep 17 00:00:00 2001
From: zhang songyi <[email protected]>
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.

---
 drivers/net/ethernet/pensando/ionic/ionic_lif.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/net/ethernet/pensando/ionic/ionic_lif.c +1 -4
index 4dd16c487f2b..a68d748502fd 100644
@@ -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

Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · On 11/2/22 6:48 AM, [email protected] wrote:

From 06579895d9e3f6441fa30d52e3b585b2015c7e2e Mon Sep 17 00:00:00 2001
From: zhang songyi <[email protected]>
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.

... although these changes usually go through the net or net-next trees. sln

Quoted 26 lines
---
  drivers/net/ethernet/pensando/ionic/ionic_lif.c | 5 +----
  1 file changed, 1 insertion(+), 4 deletions(-)
drivers/net/ethernet/pensando/ionic/ionic_lif.c +1 -5
index 4dd16c487f2b..a68d748502fd 100644
@@ -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

maintainer
#2 lore raw
Quoted 9 lines · On Wed, 2 Nov 2022 09:07:34 -0700 Shannon Nelson wrote:
Quoted 8 lines · On 11/2/22 6:48 AM, [email protected] wrote:

From 06579895d9e3f6441fa30d52e3b585b2015c7e2e Mon Sep 17 00:00:00 2001
From: zhang songyi <[email protected]>
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.

Quoted 6 lines
Quoted 2 lines

... although these changes usually go through the net or net-next trees.

net-next in this case, but it doesn't apply, please rebase and repost.