[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20191004.151037.207929699391829769.davem@davemloft.net>
Date: Fri, 04 Oct 2019 15:10:37 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: austindh.kim@...il.com
Cc: romieu@...zoreil.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net/velocity: fix -Wunused-but-set-variable warnings
From: Austin Kim <austindh.kim@...il.com>
Date: Fri, 4 Oct 2019 13:52:03 +0900
> 'curr_status' is declared as u32.
> But this variable is not used after below statement.
> curr_status = vptr->mii_status & (~VELOCITY_LINK_FAIL);
>
> This variable could be dropped to mute below warning message:
>
> drivers/net/ethernet/via/via-velocity.c:868:6:
> warning: variable ‘curr_status’ set but not used
> [-Wunused-but-set-variable]
>
> Signed-off-by: Austin Kim <austindh.kim@...il.com>
Please don't make these changes like a robot.
Always look at the surrounding context and even the history of how
this piece of code got here by using git blame and other tools.
There is a comment right under this variable assignment referring to
the variable. So if you remove the variable, you should do something
with the comment as well.
Thank you.
Powered by blists - more mailing lists