Skip to content

Commit

Permalink
Merge branch 'warnings-upstream' of git://git.kernel.org/pub/scm/linu…
Browse files Browse the repository at this point in the history
…x/kernel/git/jgarzik/misc-2.6

* 'warnings-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/misc-2.6:
  ISDN/sc: fix longstanding warning
  • Loading branch information
Linus Torvalds committed Oct 25, 2007
2 parents eadd4f5 + 9317d43 commit 0e81bef
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions drivers/isdn/sc/shmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
Expand Down

0 comments on commit 0e81bef

Please sign in to comment.