diff options
author | Jeff Garzik <jeff@garzik.org> | 2007-10-23 18:36:39 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-10-24 05:16:25 -0400 |
commit | 9317d4313e0cd51b2256ea9a9316f2d8561e37a8 (patch) | |
tree | 6cb148e250082285941510c5bc3372d50bd397c3 /drivers/isdn | |
parent | c9927c2bf4f45bb85e8b502ab3fb79ad6483c244 (diff) |
ISDN/sc: fix longstanding warning
drivers/isdn/sc/shmem.c: In function 'memcpy_toshmem':
drivers/isdn/sc/shmem.c:54: warning: passing argument 1 of 'memcpy_toio' makes pointer from integer without a cast
Also, remove some unneeded braces, and add some useful whitespace.
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/isdn')
-rw-r--r-- | drivers/isdn/sc/shmem.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/isdn/sc/shmem.c b/drivers/isdn/sc/shmem.c index 034d41a61ae..e0331e0094f 100644 --- a/drivers/isdn/sc/shmem.c +++ b/drivers/isdn/sc/shmem.c @@ -28,15 +28,15 @@ void memcpy_toshmem(int card, void *dest, const void *src, size_t n) { unsigned long flags; unsigned char ch; + unsigned long dest_rem = ((unsigned long) dest) % 0x4000; - if(!IS_VALID_CARD(card)) { + if (!IS_VALID_CARD(card)) { pr_debug("Invalid param: %d is not a valid card id\n", card); return; } - if(n > SRAM_PAGESIZE) { + if (n > SRAM_PAGESIZE) return; - } /* * determine the page to load from the address @@ -50,8 +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 + - ((unsigned long) dest % 0x4000), src, n); + memcpy_toio(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); |