Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH net-next] net: e1000: Remove set but not used variable
@ 2020-09-19 1:50 Zheng Yongjun
2020-09-19 21:14 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Zheng Yongjun @ 2020-09-19 1:50 UTC (permalink / raw)
To: jeffrey.t.kirsher, davem, kuba, intel-wired-lan, netdev, linux-kernel
Cc: Zheng Yongjun
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/net/ethernet/intel/e1000/e1000_hw.c: In function e1000_phy_init_script:
drivers/net/ethernet/intel/e1000/e1000_hw.c:132:6: warning: variable ‘ret_val’ set but not used [-Wunused-but-set-variable]
`ret_val` is never used, so remove it.
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
drivers/net/ethernet/intel/e1000/e1000_hw.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/e1000/e1000_hw.c b/drivers/net/ethernet/intel/e1000/e1000_hw.c
index 4e7a0810eaeb..f1dbd7b8ee32 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_hw.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_hw.c
@@ -129,7 +129,6 @@ static s32 e1000_set_phy_type(struct e1000_hw *hw)
*/
static void e1000_phy_init_script(struct e1000_hw *hw)
{
- u32 ret_val;
u16 phy_saved_data;
if (hw->phy_init_script) {
@@ -138,7 +137,7 @@ static void e1000_phy_init_script(struct e1000_hw *hw)
/* Save off the current value of register 0x2F5B to be restored
* at the end of this routine.
*/
- ret_val = e1000_read_phy_reg(hw, 0x2F5B, &phy_saved_data);
+ e1000_read_phy_reg(hw, 0x2F5B, &phy_saved_data);
/* Disabled the PHY transmitter */
e1000_write_phy_reg(hw, 0x2F5B, 0x0003);
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: e1000: Remove set but not used variable
2020-09-19 1:50 [PATCH net-next] net: e1000: Remove set but not used variable Zheng Yongjun
@ 2020-09-19 21:14 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-09-19 21:14 UTC (permalink / raw)
To: zhengyongjun3
Cc: jeffrey.t.kirsher, kuba, intel-wired-lan, netdev, linux-kernel
From: Zheng Yongjun <zhengyongjun3@huawei.com>
Date: Sat, 19 Sep 2020 09:50:20 +0800
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/net/ethernet/intel/e1000/e1000_hw.c: In function e1000_phy_init_script:
> drivers/net/ethernet/intel/e1000/e1000_hw.c:132:6: warning: variable ‘ret_val’ set but not used [-Wunused-but-set-variable]
>
> `ret_val` is never used, so remove it.
>
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-19 21:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-19 1:50 [PATCH net-next] net: e1000: Remove set but not used variable Zheng Yongjun
2020-09-19 21:14 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).