LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Karsten Keil <kkeil@suse.de>
To: Jeff Garzik <jeff@garzik.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
akpm@linux-foundation.org, isdn4linux@listserv.isdn4linux.de
Subject: Re: [PATCH 5/12] ISDN/sc: fix longstanding warning
Date: Wed, 24 Oct 2007 09:24:40 +0200 [thread overview]
Message-ID: <20071024072440.GA17250@pingi.kke.suse.de> (raw)
In-Reply-To: <20071023223639.DF51F1F81AB@havoc.gtf.org>
On Tue, Oct 23, 2007 at 06:36:39PM -0400, Jeff Garzik wrote:
> 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>
Acked.
> ---
>
> diff --git a/drivers/isdn/sc/shmem.c b/drivers/isdn/sc/shmem.c
> index 034d41a..e0331e0 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);
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
Karsten Keil
SuSE Labs
ISDN and VOIP development
SUSE LINUX Products GmbH, Maxfeldstr.5 90409 Nuernberg, GF: Markus Rex, HRB 16746 (AG Nuernberg)
next prev parent reply other threads:[~2007-10-24 7:24 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-23 22:36 [PATCH 1/12] X86: fix !CONFIG_SMP warning in processor.c Jeff Garzik
2007-10-23 22:36 ` [PATCH 2/12] X86: fix nvidia HPET warning Jeff Garzik
2007-10-24 4:05 ` Jeremy Fitzhardinge
2007-10-24 6:05 ` Jeff Garzik
2007-10-24 12:03 ` Ingo Molnar
2007-10-23 22:36 ` [PATCH 3/12] ACPI sbs: fix retval warning Jeff Garzik
2007-10-30 10:31 ` Jeff Garzik
2007-10-23 22:36 ` [PATCH 4/12] riscom8: fix SMP brokenness Jeff Garzik
2007-10-24 6:47 ` Jiri Slaby
2007-10-24 6:52 ` Jeff Garzik
2007-10-24 7:44 ` Jiri Slaby
2007-10-24 7:10 ` Andrew Morton
2007-10-24 7:44 ` Jiri Slaby
2007-10-24 8:00 ` Andrew Morton
2008-02-07 0:29 ` [bug] " Ingo Molnar
2008-02-20 20:37 ` Jeff Garzik
2008-02-20 22:00 ` Alan Cox
2007-10-23 22:36 ` [PATCH 5/12] ISDN/sc: fix longstanding warning Jeff Garzik
2007-10-24 7:24 ` Karsten Keil [this message]
2007-10-23 22:36 ` [PATCH 6/12] KVM: work around SMP requirement Jeff Garzik
2007-10-23 22:44 ` Adrian Bunk
2007-10-23 22:46 ` Jeff Garzik
2007-10-24 8:36 ` Avi Kivity
2007-10-24 12:32 ` [patch] kvm: fix !SMP build error Ingo Molnar
2007-10-24 12:36 ` Ingo Molnar
2007-10-24 18:11 ` Ingo Molnar
2007-11-01 3:34 ` Randy Dunlap
2007-11-01 8:31 ` Ingo Molnar
2007-11-01 13:10 ` Avi Kivity
2007-11-01 14:59 ` Ingo Molnar
2007-11-01 21:16 ` Avi Kivity
2007-10-23 22:36 ` [PATCH 7/12] eexpress: fix !SMP unused-var warning Jeff Garzik
2007-10-23 22:36 ` [PATCH 8/12] ni5010: kill unused variable Jeff Garzik
2007-10-23 22:36 ` [PATCH 9/12] cgroup: " Jeff Garzik
2007-10-24 0:19 ` Paul Menage
2007-10-23 22:36 ` [PATCH 10/12] mac80211: fix warning created by BIT() Jeff Garzik
2007-10-23 23:15 ` Randy Dunlap
2007-10-23 22:36 ` [PATCH 11/12] NET: fix subqueue bugs Jeff Garzik
2007-10-23 22:38 ` David Miller
2007-10-23 22:40 ` Jeff Garzik
2007-10-23 22:36 ` [PATCH 12/12] sound/isa: fix printk format Jeff Garzik
2007-10-24 4:03 ` [PATCH 1/12] X86: fix !CONFIG_SMP warning in processor.c Jeremy Fitzhardinge
2007-10-24 12:01 ` Ingo Molnar
2007-10-24 16:27 ` [2.6 patch] x86/kernel/acpi/processor.c: fix SMP=n warning Adrian Bunk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071024072440.GA17250@pingi.kke.suse.de \
--to=kkeil@suse.de \
--cc=akpm@linux-foundation.org \
--cc=isdn4linux@listserv.isdn4linux.de \
--cc=jeff@garzik.org \
--cc=linux-kernel@vger.kernel.org \
--subject='Re: [PATCH 5/12] ISDN/sc: fix longstanding warning' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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).