From: Dan Carpenter <dan.carpenter@oracle.com>
To: Ryan Swan <ryan@ryanswan.com>, LinoSanfilippo@gmx.de
Cc: devel@driverdev.osuosl.org, amarjargal.gundjalam@gmail.com,
janani.rvchndrn@gmail.com, gregkh@linuxfoundation.org,
linux-kernel@vger.kernel.org, liodot@gmail.com,
kevin.m.wern@gmail.com, LinoSanfilippo@gmx.de,
charrer@alacritech.com, aquannie@gmail.com
Subject: Re: [PATCH] staging: slicoss.ko: slicoss.c: Fixed incorrect argument type
Date: Wed, 19 Oct 2016 11:32:24 +0300 [thread overview]
Message-ID: <20161019083224.GE4469@mwanda> (raw)
In-Reply-To: <1476813811-22988-1-git-send-email-ryan@ryanswan.com>
On Tue, Oct 18, 2016 at 02:03:31PM -0400, 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));
This should probably just be memcpy(). Introduced in commit fdb777751278
("staging: slicoss: improve implementation concerning the shared memory").
regards,
dan carpenter
prev parent reply other threads:[~2016-10-19 14:52 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
2016-10-19 8:32 ` Dan Carpenter [this message]
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=20161019083224.GE4469@mwanda \
--to=dan.carpenter@oracle.com \
--cc=LinoSanfilippo@gmx.de \
--cc=amarjargal.gundjalam@gmail.com \
--cc=aquannie@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