2007-11-14 14:51:57

by Frank Lichtenheld

[permalink] [raw]
Subject: [PATCH] [ISDN] sc: Really, really fix warning

CC [M] drivers/isdn/sc/shmem.o
drivers/isdn/sc/shmem.c: In function ‘memcpy_toshmem’:
drivers/isdn/sc/shmem.c:53: warning: passing argument 1 of ‘memcpy_toio’ makes pointer from integer without a cast

9317d4313e0cd51b2256ea9a9316f2d8561e37a8 claimed to fix it, but
it didn't.

CC: Jeff Garzik <[email protected]>
Signed-off-by: Frank Lichtenheld <[email protected]>
---
drivers/isdn/sc/shmem.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/isdn/sc/shmem.c b/drivers/isdn/sc/shmem.c
index e0331e0..06a5554 100644
--- a/drivers/isdn/sc/shmem.c
+++ b/drivers/isdn/sc/shmem.c
@@ -50,7 +50,7 @@ void memcpy_toshmem(int card, void *dest, const void *src, size_t n)

outb(((sc_adapter[card]->shmem_magic + ch * SRAM_PAGESIZE) >> 14) | 0x80,
sc_adapter[card]->ioport[sc_adapter[card]->shmem_pgport]);
- memcpy_toio(sc_adapter[card]->rambase + dest_rem, src, n);
+ memcpy_toio((void*)(sc_adapter[card]->rambase + dest_rem), src, n);
spin_unlock_irqrestore(&sc_adapter[card]->lock, flags);
pr_debug("%s: set page to %#x\n",sc_adapter[card]->devicename,
((sc_adapter[card]->shmem_magic + ch * SRAM_PAGESIZE)>>14)|0x80);
--
1.5.3.4


2007-11-14 14:51:42

by Frank Lichtenheld

[permalink] [raw]
Subject: [PATCH] [ISDN] sc: Fix sndpkt to have the correct number of arguments

isdn_if.writebuf_skb has an additional ack flag argument which
was missing from sndpkt leading to the following warning:
CC [M] drivers/isdn/sc/init.o
drivers/isdn/sc/init.c: In function ‘sc_init’:
drivers/isdn/sc/init.c:281: warning: assignment from incompatible pointer type

Note that this doesn't actually do anything with the flag, it
just fixes the warning (and probably accessing the last argument).

Signed-off-by: Frank Lichtenheld <[email protected]>
---
drivers/isdn/sc/card.h | 2 +-
drivers/isdn/sc/packet.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/isdn/sc/card.h b/drivers/isdn/sc/card.h
index 5992f63..0120bcf 100644
--- a/drivers/isdn/sc/card.h
+++ b/drivers/isdn/sc/card.h
@@ -109,7 +109,7 @@ void memcpy_fromshmem(int card, void *dest, const void *src, size_t n);
int get_card_from_id(int driver);
int indicate_status(int card, int event, ulong Channel, char *Data);
irqreturn_t interrupt_handler(int interrupt, void *cardptr);
-int sndpkt(int devId, int channel, struct sk_buff *data);
+int sndpkt(int devId, int channel, int ack, struct sk_buff *data);
void rcvpkt(int card, RspMessage *rcvmsg);
int command(isdn_ctrl *cmd);
int reset(int card);
diff --git a/drivers/isdn/sc/packet.c b/drivers/isdn/sc/packet.c
index 92016a2..5ff6ae8 100644
--- a/drivers/isdn/sc/packet.c
+++ b/drivers/isdn/sc/packet.c
@@ -20,7 +20,7 @@
#include "message.h"
#include "card.h"

-int sndpkt(int devId, int channel, struct sk_buff *data)
+int sndpkt(int devId, int channel, int ack, struct sk_buff *data)
{
LLData ReqLnkWrite;
int status;
--
1.5.3.4

2007-11-14 15:05:30

by Karsten Keil

[permalink] [raw]
Subject: Re: [PATCH] [ISDN] sc: Really, really fix warning

On Wed, Nov 14, 2007 at 03:46:20PM +0100, Frank Lichtenheld wrote:
> CC [M] drivers/isdn/sc/shmem.o
> drivers/isdn/sc/shmem.c: In function ‘memcpy_toshmem’:
> drivers/isdn/sc/shmem.c:53: warning: passing argument 1 of ‘memcpy_toio’ makes pointer from integer without a cast
>
> 9317d4313e0cd51b2256ea9a9316f2d8561e37a8 claimed to fix it, but
> it didn't.
>
> CC: Jeff Garzik <[email protected]>
Acked-by:Karsten Keil <kkeilæsuse.de>
> Signed-off-by: Frank Lichtenheld <[email protected]>
> ---
> drivers/isdn/sc/shmem.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/isdn/sc/shmem.c b/drivers/isdn/sc/shmem.c
> index e0331e0..06a5554 100644
> --- a/drivers/isdn/sc/shmem.c
> +++ b/drivers/isdn/sc/shmem.c
> @@ -50,7 +50,7 @@ void memcpy_toshmem(int card, void *dest, const void *src, size_t n)
>
> outb(((sc_adapter[card]->shmem_magic + ch * SRAM_PAGESIZE) >> 14) | 0x80,
> sc_adapter[card]->ioport[sc_adapter[card]->shmem_pgport]);
> - memcpy_toio(sc_adapter[card]->rambase + dest_rem, src, n);
> + memcpy_toio((void*)(sc_adapter[card]->rambase + dest_rem), src, n);
> spin_unlock_irqrestore(&sc_adapter[card]->lock, flags);
> pr_debug("%s: set page to %#x\n",sc_adapter[card]->devicename,
> ((sc_adapter[card]->shmem_magic + ch * SRAM_PAGESIZE)>>14)|0x80);
> --
> 1.5.3.4

--
Karsten Keil
SuSE Labs
ISDN and VOIP development
SUSE LINUX Products GmbH, Maxfeldstr.5 90409 Nuernberg, GF: Markus Rex, HRB 16746 (AG Nuernberg)