diff mbox

[net-next] net: smc91x: Remove an unused variable

Message ID 1427733818-11823-1-git-send-email-festevam@gmail.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Fabio Estevam March 30, 2015, 4:43 p.m. UTC
From: Fabio Estevam <fabio.estevam@freescale.com>

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.

Reported-by: Olof's autobuilder <build@lixom.net>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 drivers/net/ethernet/smsc/smc91x.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Uwe Kleine-König March 30, 2015, 5:20 p.m. UTC | #1
On Mon, Mar 30, 2015 at 01:43:38PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> 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.
> 
> Reported-by: Olof's autobuilder <build@lixom.net>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
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.

Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Best regards
Uwe
David Miller March 31, 2015, 2:53 p.m. UTC | #2
From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Date: Mon, 30 Mar 2015 19:20:57 +0200

> On Mon, Mar 30, 2015 at 01:43:38PM -0300, Fabio Estevam wrote:
>> From: Fabio Estevam <fabio.estevam@freescale.com>
>> 
>> 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.
>> 
>> Reported-by: Olof's autobuilder <build@lixom.net>
>> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> 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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Uwe Kleine-König March 31, 2015, 5:38 p.m. UTC | #3
On Tue, Mar 31, 2015 at 10:53:28AM -0400, David Miller wrote:
> From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Date: Mon, 30 Mar 2015 19:20:57 +0200
> 
> > On Mon, Mar 30, 2015 at 01:43:38PM -0300, Fabio Estevam wrote:
> >> From: Fabio Estevam <fabio.estevam@freescale.com>
> >> 
> >> 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.
> >> 
> >> Reported-by: Olof's autobuilder <build@lixom.net>
> >> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> > 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
David Miller March 31, 2015, 8:41 p.m. UTC | #4
From: Fabio Estevam <festevam@gmail.com>
Date: Mon, 30 Mar 2015 13:43:38 -0300

> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> 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.
> 
> Reported-by: Olof's autobuilder <build@lixom.net>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/ethernet/smsc/smc91x.c b/drivers/net/ethernet/smsc/smc91x.c
index 5a1a3e7..14b363a 100644
--- a/drivers/net/ethernet/smsc/smc91x.c
+++ b/drivers/net/ethernet/smsc/smc91x.c
@@ -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))