Fwd: [PATCH] net: microchip: sparx5: Remove unneeded variable

Steen Hegelund steen.hegelund at microchip.com
Wed Jun 14 04:29:52 PDT 2023


Hi Bao,

I could not apply your patch as there seems to be no message id in the mail
headers.  I also could not find it on patchwork, so it seems like it has been
ignored there.

Could you please resend this with the proper details - otherwise the change
looks good to me.

BR
Steen

On Tue, 2023-06-13 at 17:53 +0800, baomingtong001 at 208suo.com wrote:
> 
>  You don't often get email from baomingtong001 at 208suo.com. Learn why this is
> important
> 
> 
> 
> 
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the
> content is safe
> 
> 
> Fix the following coccicheck warning:
> 
> drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c:1435:5-8: Unneeded
> variable: "err".
> 
> Signed-off-by: Mingtong Bao <baomingtong001 at 208suo.com>
> ---
>  drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c
> b/drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c
> index 3f87a5285a6d..03a9b226c9c5 100644
> --- a/drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c
> +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c
> @@ -1432,7 +1432,6 @@ static int sparx5_tc_flower_template_destroy(struct
> net_device *ndev,
>  {
>      struct sparx5_port *port = netdev_priv(ndev);
>      struct sparx5_tc_flower_template *ftp, *tmp;
> -    int err = -ENOENT;
>  
>      /* Rules using the template are removed by the tc framework */
>      list_for_each_entry_safe(ftp, tmp, &port->tc_templates, list) {
> @@ -1447,7 +1446,7 @@ static int sparx5_tc_flower_template_destroy(struct
> net_device *ndev,
>          kfree(ftp);
>          break;
>      }
> -    return err;
> +    return -ENOENT;
>  }
>  
>  int sparx5_tc_flower(struct net_device *ndev, struct flow_cls_offload *fco,




More information about the linux-arm-kernel mailing list