Skip to contentSkip to conversation

net: smc91x: Remove an unused variable

PATCH Applied Fabio Estevam 3 participants 5 messages Mar 30, 2015 – Mar 31, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: smc91x: Remove an unused variable

From: Fabio Estevam <[email protected]>

Commit cb6e0b3690f48dff ("net: smc91x: make use of 4th parameter to devm_gpiod_get_index") caused the following build warning:

drivers/net/ethernet/smsc/smc91x.c:2208:6: warning: unused variable 'res' [-Wunused-variable]

Remove the unused 'res' variable.

---
 drivers/net/ethernet/smsc/smc91x.c | 1 -
 1 file changed, 1 deletion(-)
drivers/net/ethernet/smsc/smc91x.c +0 -1
index 5a1a3e7..14b363a 100644
@@ -2205,7 +2205,6 @@ static int try_toggle_control_gpio(struct device *dev,
 {
 	struct gpio_desc *gpio = *desc;
 	enum gpiod_flags flags = value ? GPIOD_OUT_LOW : GPIOD_OUT_HIGH;
-	int res;
 
 	gpio = devm_gpiod_get_index_optional(dev, name, index, flags);
 	if (IS_ERR(gpio))
Signature · 1 line
1.9.1
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

Commit cb6e0b3690f48dff ("net: smc91x: make use of 4th parameter to devm_gpiod_get_index") caused the following build warning:

drivers/net/ethernet/smsc/smc91x.c:2208:6: warning: unused variable 'res' [-Wunused-variable]

Remove the unused 'res' variable.

I wonder why I didn't notice this because the 0day build robot tested my tree and didn't report this warning. Probably that means this driver wasn't tested.

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
maintainer
#2 lore raw

From: Uwe Kleine-König <[email protected]>
Date: Mon, 30 Mar 2015 19:20:57 +0200

Quoted 8 lines · Fabio Estevam
Quoted 7 lines

From: Fabio Estevam <[email protected]>

Commit cb6e0b3690f48dff ("net: smc91x: make use of 4th parameter to devm_gpiod_get_index") caused the following build warning:

drivers/net/ethernet/smsc/smc91x.c:2208:6: warning: unused variable 'res' [-Wunused-variable]

Quoted 7 lines
Quoted 4 lines

Remove the unused 'res' variable.

I wonder why I didn't notice this because the 0day build robot tested my tree and didn't report this warning. Probably that means this driver wasn't tested.

This driver can't be enabled on x86/x86-64 so the build testing it will get is going to be extremely limited.

#3 lore raw
Quoted 13 lines · David Miller

From: Uwe Kleine-König <[email protected]>
Date: Mon, 30 Mar 2015 19:20:57 +0200

Quoted 10 lines · Fabio Estevam
Quoted 9 lines

From: Fabio Estevam <[email protected]>

Commit cb6e0b3690f48dff ("net: smc91x: make use of 4th parameter to devm_gpiod_get_index") caused the following build warning:

drivers/net/ethernet/smsc/smc91x.c:2208:6: warning: unused variable 'res' [-Wunused-variable]

Remove the unused 'res' variable.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

I wonder why I didn't notice this because the 0day build robot tested my tree and didn't report this warning. Probably that means this driver wasn't tested.

This driver can't be enabled on x86/x86-64 so the build testing it will get is going to be extremely limited.

The build bot also builds other archs, at least arm and powerpc, but I think there are more.

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
maintainer Applied
#4 lore raw
In reply to Fabio Estevam

From: Fabio Estevam <[email protected]>
Date: Mon, 30 Mar 2015 13:43:38 -0300

Quoted 11 lines

From: Fabio Estevam <[email protected]>

Commit cb6e0b3690f48dff ("net: smc91x: make use of 4th parameter to devm_gpiod_get_index") caused the following build warning:

drivers/net/ethernet/smsc/smc91x.c:2208:6: warning: unused variable 'res' [-Wunused-variable]

Remove the unused 'res' variable.

Applied, thanks.