From: Greg KH <gregkh@linuxfoundation.org>
To: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Cc: outreachy-kernel@googlegroups.com
Subject: Re: [Outreachy kernel] [PATCH 1/3] staging: rts5208: Fix endian sparse warnings
Date: Sat, 24 Oct 2015 19:38:16 -0700 [thread overview]
Message-ID: <20151025023816.GA4627@kroah.com> (raw)
In-Reply-To: <911b93626cc1fc3ad775ddf55a705e32f2733219.1445453573.git.amitoj1606@gmail.com>
On Thu, Oct 22, 2015 at 12:29:30AM +0530, Amitoj Kaur Chawla wrote:
> Fix bug found using sparse which gives the following warning:
>
> drivers/staging/rts5208/rtsx_transport.c:217:34: warning: incorrect
> type in assignment (different base types)
> drivers/staging/rts5208/rtsx_transport.c:217:34: expected unsigned int
> [unsigned] [usertype] <noident>
> drivers/staging/rts5208/rtsx_transport.c:217:34: got restricted __le32
> [usertype] <noident>
> drivers/staging/rts5208/rtsx_transport.c:316:44: warning: incorrect
> type in assignment (different base types)
> drivers/staging/rts5208/rtsx_transport.c:316:44: expected unsigned
> long long [unsigned] [long] [long long] [usertype] <noident>
> drivers/staging/rts5208/rtsx_transport.c:316:44: got restricted __le64
> [usertype] <noident>
> drivers/staging/rts5208/rtsx_transport.c:316:44: warning: incorrect
> type in assignment (different base types)
> drivers/staging/rts5208/rtsx_transport.c:316:44: expected unsigned
> long long [unsigned] [long] [long long] [usertype] <noident>
> drivers/staging/rts5208/rtsx_transport.c:316:44: got restricted __le64
> [usertype] <noident>
>
> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
> ---
> drivers/staging/rts5208/rtsx_transport.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/rts5208/rtsx_transport.c b/drivers/staging/rts5208/rtsx_transport.c
> index f27491e..a650498 100644
> --- a/drivers/staging/rts5208/rtsx_transport.c
> +++ b/drivers/staging/rts5208/rtsx_transport.c
> @@ -204,7 +204,7 @@ Handle_Errors:
> void rtsx_add_cmd(struct rtsx_chip *chip,
> u8 cmd_type, u16 reg_addr, u8 mask, u8 data)
> {
> - u32 *cb = (u32 *)(chip->host_cmds_ptr);
> + __le32 *cb = (__le32 *)(chip->host_cmds_ptr);
Why __le32?
> u32 val = 0;
>
> val |= (u32)(cmd_type & 0x03) << 30;
> @@ -297,7 +297,7 @@ finish_send_cmd:
> static inline void rtsx_add_sg_tbl(
> struct rtsx_chip *chip, u32 addr, u32 len, u8 option)
> {
> - u64 *sgb = (u64 *)(chip->host_sg_tbl_ptr);
> + __le64 *sgb = (__le64 *)(chip->host_sg_tbl_ptr);
Why __le64?
thanks,
greg k-h
next prev parent reply other threads:[~2015-10-25 8:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-21 18:57 [PATCH 0/3] staging: Fix endian sparse warnings Amitoj Kaur Chawla
2015-10-21 18:59 ` [PATCH 1/3] staging: rts5208: " Amitoj Kaur Chawla
2015-10-25 2:38 ` Greg KH [this message]
2015-10-21 19:01 ` [PATCH 2/3] staging: lustre: lmv: " Amitoj Kaur Chawla
2015-10-25 1:48 ` [Outreachy kernel] " Greg KH
2015-10-25 14:11 ` Amitoj Kaur Chawla
2015-10-21 19:03 ` [PATCH 3/3] staging: lustre: lnet: " Amitoj Kaur Chawla
2015-10-25 1:49 ` [Outreachy kernel] " Greg KH
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=20151025023816.GA4627@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=amitoj1606@gmail.com \
--cc=outreachy-kernel@googlegroups.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.