lkml.org 
[lkml]   [2018]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH][next] lan743x: remove some redundant variables and assignments
From
From: Colin King <colin.king@canonical.com>
Date: Sun, 11 Mar 2018 17:42:33 +0100

> From: Colin Ian King <colin.king@canonical.com>
>
> Function lan743x_phy_init assigns pointer 'netdev' but this is never read
> and hence it can be removed. The return error code handling can also be
> cleaned up to remove the variable 'ret'.
>
> Function lan743x_phy_link_status_change assigns pointer 'phy' twice and
> this is never read, so it also can be removed.
>
> Finally, function lan743x_tx_napi_poll initializes pointer 'adapter'
> and then re-assigns the same value into this pointer a little later on
> so this second assignment is redundant and can be also removed.
>
> Cleans up clang warnings:
> drivers/net/ethernet/microchip/lan743x_main.c:951:2: warning: Value
> stored to 'netdev' is never read
> drivers/net/ethernet/microchip/lan743x_main.c:971:3: warning: Value
> stored to 'phy' is never read
> drivers/net/ethernet/microchip/lan743x_main.c:1583:26: warning: Value
> stored to 'adapter' during its initialization is never read
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied.

\
 
 \ /
  Last update: 2018-03-12 16:14    [W:0.029 / U:0.940 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site