From: Greg KH <gregkh@linuxfoundation.org>
To: Anirudh Rayabharam <mail@anirudhrb.com>
Cc: lee.jones@linaro.org, kuba@kernel.org, johannes@sipsolutions.net,
colin.king@canonical.com, arnd@arndb.de,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: wimax/i2400m: fix some byte order issues found by sparse
Date: Thu, 11 Feb 2021 21:35:27 +0100 [thread overview]
Message-ID: <YCWVD34rU5Lu71/S@kroah.com> (raw)
In-Reply-To: <20210211202908.4604-1-mail@anirudhrb.com>
On Fri, Feb 12, 2021 at 01:59:08AM +0530, Anirudh Rayabharam wrote:
> Fix sparse byte-order warnings in the i2400m_bm_cmd_prepare()
> function:
>
> wimax/i2400m/fw.c:194:36: warning: restricted __le32 degrades to integer
> wimax/i2400m/fw.c:195:34: warning: invalid assignment: +=
> wimax/i2400m/fw.c:195:34: left side has type unsigned int
> wimax/i2400m/fw.c:195:34: right side has type restricted __le32
> wimax/i2400m/fw.c:196:32: warning: restricted __le32 degrades to integer
> wimax/i2400m/fw.c:196:47: warning: restricted __le32 degrades to integer
> wimax/i2400m/fw.c:196:66: warning: restricted __le32 degrades to integer
>
> Signed-off-by: Anirudh Rayabharam <mail@anirudhrb.com>
> ---
> drivers/staging/wimax/i2400m/fw.c | 14 +++++++++-----
> 1 file changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/staging/wimax/i2400m/fw.c b/drivers/staging/wimax/i2400m/fw.c
> index b2fd4bd2c5f9..bce651a6b543 100644
> --- a/drivers/staging/wimax/i2400m/fw.c
> +++ b/drivers/staging/wimax/i2400m/fw.c
> @@ -189,12 +189,16 @@ void i2400m_bm_cmd_prepare(struct i2400m_bootrom_header *cmd)
> {
> if (i2400m_brh_get_use_checksum(cmd)) {
> int i;
> - u32 checksum = 0;
> + __le32 checksum = 0;
__le32 is only for when the data crosses the kernel/user boundry, just
use le32 in the kernel for stuff like this.
> const u32 *checksum_ptr = (void *) cmd->payload;
Add a blank line here, right?
thanks,
greg k-h
next prev parent reply other threads:[~2021-02-11 20:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-11 20:29 [PATCH] staging: wimax/i2400m: fix some byte order issues found by sparse Anirudh Rayabharam
2021-02-11 20:35 ` Greg KH [this message]
2021-02-12 14:30 ` Anirudh Rayabharam
2021-02-12 14:43 ` Greg KH
2021-02-12 17:17 ` Anirudh Rayabharam
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=YCWVD34rU5Lu71/S@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=arnd@arndb.de \
--cc=colin.king@canonical.com \
--cc=devel@driverdev.osuosl.org \
--cc=johannes@sipsolutions.net \
--cc=kuba@kernel.org \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mail@anirudhrb.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.