[Intel-wired-lan] [PATCH net-next v2 04/10] drivers/net/ethernet: clean up unused assignments

Edward Cree ecree at solarflare.com
Tue Sep 15 09:02:49 UTC 2020


On 15/09/2020 02:44, Jesse Brandeburg wrote:
> As part of the W=1 compliation series, these lines all created
> warnings about unused variables that were assigned a value. Most
> of them are from register reads, but some are just picking up
> a return value from a function and never doing anything with it.
>
> The register reads should be OK, because the current
> implementation of readl and friends will always execute even
> without an lvalue.
>
> When it makes sense, just remove the lvalue assignment and the
> local. Other times, just remove the offending code, and
> occasionally, just mark the variable as maybe unused since it
> could be used in an ifdef or debug scenario.
>
> Only compile tested with W=1.
>
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg at intel.com>
For sfc/falcon:
Acked-by: Edward Cree <ecree at solarflare.com>


More information about the Intel-wired-lan mailing list