[Intel-wired-lan] [PATCH net-next] igc: Remove set but not used variables 'ctrl_ext, link_mode'

Brown, Aaron F aaron.f.brown at intel.com
Thu Nov 1 19:24:35 UTC 2018


> From: netdev-owner at vger.kernel.org [mailto:netdev-
> owner at vger.kernel.org] On Behalf Of YueHaibing
> Sent: Friday, October 19, 2018 5:41 AM
> To: Kirsher, Jeffrey T <jeffrey.t.kirsher at intel.com>; Neftin, Sasha
> <sasha.neftin at intel.com>
> Cc: YueHaibing <yuehaibing at huawei.com>; intel-wired-lan at lists.osuosl.org;
> netdev at vger.kernel.org; kernel-janitors at vger.kernel.org
> Subject: [PATCH net-next] igc: Remove set but not used variables 'ctrl_ext,
> link_mode'
> 
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/net/ethernet/intel/igc/igc_base.c: In function
> 'igc_init_phy_params_base':
> drivers/net/ethernet/intel/igc/igc_base.c:240:6: warning:
>  variable 'ctrl_ext' set but not used [-Wunused-but-set-variable]
>   u32 ctrl_ext;
> 
> drivers/net/ethernet/intel/igc/igc_base.c: In function
> 'igc_get_invariants_base':
> drivers/net/ethernet/intel/igc/igc_base.c:290:6: warning:
>  variable 'link_mode' set but not used [-Wunused-but-set-variable]
>   u32 link_mode = 0;
> 
> It never used since introduction in
> commit c0071c7aa5fe ("igc: Add HW initialization code")
> 
> Signed-off-by: YueHaibing <yuehaibing at huawei.com>
> ---
> I'm not sure that reading IGC_CTRL_EXT is necessary.
> ---
>  drivers/net/ethernet/intel/igc/igc_base.c | 8 --------
>  1 file changed, 8 deletions(-)
> 

Tested-by: Aaron Brown <aaron.f.brown at intel.com>



More information about the Intel-wired-lan mailing list