netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] smsc911x: fix smsc911x_reg_read compiler warning
@ 2009-01-10 13:29 Steve Glendinning
  2009-01-10 13:29 ` [PATCH 2/2] smsc911x: register irq with device name, not driver name Steve Glendinning
  2009-01-11  8:14 ` [PATCH 1/2] smsc911x: fix smsc911x_reg_read compiler warning David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Steve Glendinning @ 2009-01-10 13:29 UTC (permalink / raw)
  To: netdev; +Cc: Ian Saturley, Steve Glendinning

if this code path is ever hit, the platform_data struct isn't properly
configured with a bus width flag so the device won't work (hence the
BUG()).

This patch adds a dummy return statement to eliminate this compiler
warning:

drivers/net/smsc911x.c: In function 'smsc911x_reg_read':
drivers/net/smsc911x.c:148: warning: control reaches end of non-void function

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
---
 drivers/net/smsc911x.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c
index dc3f110..1f443d8 100644
--- a/drivers/net/smsc911x.c
+++ b/drivers/net/smsc911x.c
@@ -144,6 +144,7 @@ static inline u32 smsc911x_reg_read(struct smsc911x_data *pdata, u32 reg)
 	}
 
 	BUG();
+	return 0;
 }
 
 static inline void smsc911x_reg_write(struct smsc911x_data *pdata, u32 reg,
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] smsc911x: register irq with device name, not driver name
  2009-01-10 13:29 [PATCH 1/2] smsc911x: fix smsc911x_reg_read compiler warning Steve Glendinning
@ 2009-01-10 13:29 ` Steve Glendinning
  2009-01-11  8:14   ` David Miller
  2009-01-11  8:14 ` [PATCH 1/2] smsc911x: fix smsc911x_reg_read compiler warning David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: Steve Glendinning @ 2009-01-10 13:29 UTC (permalink / raw)
  To: netdev; +Cc: Ian Saturley, Steve Glendinning

This change lets "cat /proc/interrupts" show the name of the ethernet
device (e.g. eth0) rather than the driver name (smsc911x).

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
---
 drivers/net/smsc911x.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c
index 1f443d8..ad47899 100644
--- a/drivers/net/smsc911x.c
+++ b/drivers/net/smsc911x.c
@@ -1968,7 +1968,7 @@ static int __devinit smsc911x_drv_probe(struct platform_device *pdev)
 	smsc911x_reg_write(pdata, INT_STS, 0xFFFFFFFF);
 
 	retval = request_irq(dev->irq, smsc911x_irqhandler, IRQF_DISABLED,
-			     SMSC_CHIPNAME, dev);
+			     dev->name, dev);
 	if (retval) {
 		SMSC_WARNING(PROBE,
 			"Unable to claim requested irq: %d", dev->irq);
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] smsc911x: fix smsc911x_reg_read compiler warning
  2009-01-10 13:29 [PATCH 1/2] smsc911x: fix smsc911x_reg_read compiler warning Steve Glendinning
  2009-01-10 13:29 ` [PATCH 2/2] smsc911x: register irq with device name, not driver name Steve Glendinning
@ 2009-01-11  8:14 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2009-01-11  8:14 UTC (permalink / raw)
  To: steve.glendinning; +Cc: netdev, ian.saturley

From: Steve Glendinning <steve.glendinning@smsc.com>
Date: Sat, 10 Jan 2009 13:29:28 +0000

> if this code path is ever hit, the platform_data struct isn't properly
> configured with a bus width flag so the device won't work (hence the
> BUG()).
> 
> This patch adds a dummy return statement to eliminate this compiler
> warning:
> 
> drivers/net/smsc911x.c: In function 'smsc911x_reg_read':
> drivers/net/smsc911x.c:148: warning: control reaches end of non-void function
> 
> Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>

Applied.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] smsc911x: register irq with device name, not driver name
  2009-01-10 13:29 ` [PATCH 2/2] smsc911x: register irq with device name, not driver name Steve Glendinning
@ 2009-01-11  8:14   ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2009-01-11  8:14 UTC (permalink / raw)
  To: steve.glendinning; +Cc: netdev, ian.saturley

From: Steve Glendinning <steve.glendinning@smsc.com>
Date: Sat, 10 Jan 2009 13:29:29 +0000

> This change lets "cat /proc/interrupts" show the name of the ethernet
> device (e.g. eth0) rather than the driver name (smsc911x).
> 
> Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>

Also applied, thanks Steve.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-01-11  8:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-10 13:29 [PATCH 1/2] smsc911x: fix smsc911x_reg_read compiler warning Steve Glendinning
2009-01-10 13:29 ` [PATCH 2/2] smsc911x: register irq with device name, not driver name Steve Glendinning
2009-01-11  8:14   ` David Miller
2009-01-11  8:14 ` [PATCH 1/2] smsc911x: fix smsc911x_reg_read compiler warning 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).