From: Lino Sanfilippo <LinoSanfilippo@gmx.de>
To: Ryan Swan <ryan@ryanswan.com>, devel@driverdev.osuosl.org
Cc: liodot@gmail.com, charrer@alacritech.com,
gregkh@linuxfoundation.org, bmarsh94@gmail.com,
amarjargal.gundjalam@gmail.com, aquannie@gmail.com,
janani.rvchndrn@gmail.com, kevin.m.wern@gmail.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: slicoss.ko: slicoss.c: Fixed incorrect argument type
Date: Tue, 18 Oct 2016 21:22:07 +0200 [thread overview]
Message-ID: <2d4bd18f-1e31-e62e-6ae4-d544bae933cd@gmx.de> (raw)
In-Reply-To: <1476813811-22988-1-git-send-email-ryan@ryanswan.com>
Hi Ryan,
On 18.10.2016 20:03, Ryan Swan wrote:
> sparse produced
> warning: incorrect type in argument 2 (different address spaces)
> expected void const volatile [noderef] <asn:2>*src
> got struct slic_stats *stats
>
> casting argument 2 to what is expected by memcpy_fromio() fixed this
>
> Signed-off-by: Ryan Swan <ryan@ryanswan.com>
> ---
> drivers/staging/slicoss/slicoss.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c
> index 2802b90..7c6feb1 100644
> --- a/drivers/staging/slicoss/slicoss.c
> +++ b/drivers/staging/slicoss/slicoss.c
> @@ -1057,7 +1057,7 @@ static void slic_upr_request_complete(struct adapter *adapter, u32 isr)
> if (stats->rcv_drops > old->rcv_drops)
> adapter->rcv_drops += (stats->rcv_drops -
> old->rcv_drops);
> - memcpy_fromio(old, stats, sizeof(*stats));
> + memcpy_fromio(old, (void __iomem *)stats, sizeof(*stats));
> break;
> }
> case SLIC_UPR_RLSR:
>
The issue here is the use of memcpy_fromio() while it actually is not io but dma
memory that we copy from.
Regards,
Lino
next prev parent reply other threads:[~2016-10-18 19:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-18 18:03 [PATCH] staging: slicoss.ko: slicoss.c: Fixed incorrect argument type Ryan Swan
2016-10-18 19:22 ` Lino Sanfilippo [this message]
2016-10-19 8:32 ` Dan Carpenter
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=2d4bd18f-1e31-e62e-6ae4-d544bae933cd@gmx.de \
--to=linosanfilippo@gmx.de \
--cc=amarjargal.gundjalam@gmail.com \
--cc=aquannie@gmail.com \
--cc=bmarsh94@gmail.com \
--cc=charrer@alacritech.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=janani.rvchndrn@gmail.com \
--cc=kevin.m.wern@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=liodot@gmail.com \
--cc=ryan@ryanswan.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox