linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ewrk3: silence GCC warning
@ 2012-11-24 12:12 Paul Bolle
  2012-11-25 10:45 ` richard -rw- weinberger
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Bolle @ 2012-11-24 12:12 UTC (permalink / raw)
  To: netdev; +Cc: linux-kernel

Building ewrk3.o triggers this GCC warning:
    drivers/net/ethernet/dec/ewrk3.c: In function '__check_irq':
    drivers/net/ethernet/dec/ewrk3.c:1915:1: warning: return from incompatible pointer type [enabled by default]

This can be trivially fixed by changing the 'irq' parameter from int to
byte (which is the alias for unsigned char for module parameters).

While we're touching this code also drop an outdated comment, that
should have been dropped with the patch named "MODULE_PARM conversions"
from early 2005.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
---
Compile tested only.

 drivers/net/ethernet/dec/ewrk3.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/dec/ewrk3.c b/drivers/net/ethernet/dec/ewrk3.c
index 17ae8c6..9f992b9 100644
--- a/drivers/net/ethernet/dec/ewrk3.c
+++ b/drivers/net/ethernet/dec/ewrk3.c
@@ -1910,9 +1910,8 @@ static struct net_device *ewrk3_devs[MAX_NUM_EWRK3S];
 static int ndevs;
 static int io[MAX_NUM_EWRK3S+1] = { 0x300, 0, };
 
-/* '21' below should really be 'MAX_NUM_EWRK3S' */
 module_param_array(io, int, NULL, 0);
-module_param_array(irq, int, NULL, 0);
+module_param_array(irq, byte, NULL, 0);
 MODULE_PARM_DESC(io, "EtherWORKS 3 I/O base address(es)");
 MODULE_PARM_DESC(irq, "EtherWORKS 3 IRQ number(s)");
 
-- 
1.7.7.6


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

* Re: [PATCH] ewrk3: silence GCC warning
  2012-11-24 12:12 [PATCH] ewrk3: silence GCC warning Paul Bolle
@ 2012-11-25 10:45 ` richard -rw- weinberger
  2012-11-26  9:41   ` Paul Bolle
  0 siblings, 1 reply; 3+ messages in thread
From: richard -rw- weinberger @ 2012-11-25 10:45 UTC (permalink / raw)
  To: Paul Bolle; +Cc: netdev, linux-kernel

On Sat, Nov 24, 2012 at 1:12 PM, Paul Bolle <pebolle@tiscali.nl> wrote:
> Building ewrk3.o triggers this GCC warning:
>     drivers/net/ethernet/dec/ewrk3.c: In function '__check_irq':
>     drivers/net/ethernet/dec/ewrk3.c:1915:1: warning: return from incompatible pointer type [enabled by default]
>
> This can be trivially fixed by changing the 'irq' parameter from int to
> byte (which is the alias for unsigned char for module parameters).
>
> While we're touching this code also drop an outdated comment, that
> should have been dropped with the patch named "MODULE_PARM conversions"
> from early 2005.

Please send this change as an additional patch.

-- 
Thanks,
//richard

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

* Re: [PATCH] ewrk3: silence GCC warning
  2012-11-25 10:45 ` richard -rw- weinberger
@ 2012-11-26  9:41   ` Paul Bolle
  0 siblings, 0 replies; 3+ messages in thread
From: Paul Bolle @ 2012-11-26  9:41 UTC (permalink / raw)
  To: richard -rw- weinberger; +Cc: netdev, linux-kernel

On Sun, 2012-11-25 at 11:45 +0100, richard -rw- weinberger wrote:
> > While we're touching this code also drop an outdated comment, that
> > should have been dropped with the patch named "MODULE_PARM conversions"
> > from early 2005.
> 
> Please send this change as an additional patch.

Sure. Although it will be a trivial patch I suppose it's easiest for
everyone if I still send it to netdev (and not to trivial, which
normally handles stuff like that).


Paul Bolle   



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

end of thread, other threads:[~2012-11-26  9:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-24 12:12 [PATCH] ewrk3: silence GCC warning Paul Bolle
2012-11-25 10:45 ` richard -rw- weinberger
2012-11-26  9:41   ` Paul Bolle

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).