netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH linux-next] ionic: remove redundant ret variable
@ 2022-11-02 13:48 zhang.songyi
  2022-11-02 16:07 ` Shannon Nelson
  0 siblings, 1 reply; 3+ messages in thread
From: zhang.songyi @ 2022-11-02 13:48 UTC (permalink / raw)
  To: snelson
  Cc: drivers, davem, edumazet, kuba, pabeni, brett, mohamed, netdev,
	linux-kernel, zhang.songyi, jiang.xuexin, xue.zhihong

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH linux-next] ionic: remove redundant ret variable
  2022-11-02 13:48 [PATCH linux-next] ionic: remove redundant ret variable zhang.songyi
@ 2022-11-02 16:07 ` Shannon Nelson
  2022-11-04  3:50   ` Jakub Kicinski
  0 siblings, 1 reply; 3+ messages in thread
From: Shannon Nelson @ 2022-11-02 16:07 UTC (permalink / raw)
  To: zhang.songyi, snelson
  Cc: drivers, davem, edumazet, kuba, pabeni, brett, mohamed, netdev,
	linux-kernel, jiang.xuexin, xue.zhihong

On 11/2/22 6:48 AM, zhang.songyi@zte.com.cn wrote:
>  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>

Acked-by: Shannon Nelson <snelson@pensando.io>

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



> ---
>   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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH linux-next] ionic: remove redundant ret variable
  2022-11-02 16:07 ` Shannon Nelson
@ 2022-11-04  3:50   ` Jakub Kicinski
  0 siblings, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2022-11-04  3:50 UTC (permalink / raw)
  To: zhang.songyi
  Cc: Shannon Nelson, snelson, drivers, davem, edumazet, pabeni, brett,
	mohamed, netdev, linux-kernel, jiang.xuexin, xue.zhihong

On Wed, 2 Nov 2022 09:07:34 -0700 Shannon Nelson wrote:
> On 11/2/22 6:48 AM, zhang.songyi@zte.com.cn wrote:
> >  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>  
> 
> Acked-by: Shannon Nelson <snelson@pensando.io>
> 
> ... 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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-11-04  3:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-02 13:48 [PATCH linux-next] ionic: remove redundant ret variable zhang.songyi
2022-11-02 16:07 ` Shannon Nelson
2022-11-04  3:50   ` Jakub Kicinski

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).