From: Joe Perches <joe@perches.com>
To: Surendra Patil <surendra.tux@gmail.com>
Cc: marcel@holtmann.org, gustavo@padovan.org,
johan.hedberg@gmail.com, linux-bluetooth@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drivers:bluetooth:ath3k.c: Fixed sparse warning for cast to restricted __le32
Date: Tue, 25 Mar 2014 01:32:33 -0700 [thread overview]
Message-ID: <1395736353.3010.6.camel@joe-AO722> (raw)
In-Reply-To: <1395735950-17968-1-git-send-email-surendra.tux@gmail.com>
On Tue, 2014-03-25 at 01:25 -0700, Surendra Patil wrote:
> This patch fixes below Sparse warnings -
> drivers/bluetooth/ath3k.c:370:17: warning: cast to restricted __le32
> drivers/bluetooth/ath3k.c:432:17: warning: cast to restricted __le32
You are changing output here.
I suspect rom_version should be marked __le32 instead
of unsigned int in "struct ath3k_version" instead.
> Signed-off-by: Surendra Patil <surendra.tux@gmail.com>
> ---
> drivers/bluetooth/ath3k.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
> index be571fe..badacbc 100644
> --- a/drivers/bluetooth/ath3k.c
> +++ b/drivers/bluetooth/ath3k.c
> @@ -367,7 +367,7 @@ static int ath3k_load_patch(struct usb_device *udev)
> }
>
> snprintf(filename, ATH3K_NAME_LEN, "ar3k/AthrBT_0x%08x.dfu",
> - le32_to_cpu(fw_version.rom_version));
> + fw_version.rom_version);
>
> ret = request_firmware(&firmware, filename, &udev->dev);
> if (ret < 0) {
> @@ -429,7 +429,7 @@ static int ath3k_load_syscfg(struct usb_device *udev)
> }
>
> snprintf(filename, ATH3K_NAME_LEN, "ar3k/ramps_0x%08x_%d%s",
> - le32_to_cpu(fw_version.rom_version), clk_value, ".dfu");
> + fw_version.rom_version, clk_value, ".dfu");
>
> ret = request_firmware(&firmware, filename, &udev->dev);
> if (ret < 0) {
next prev parent reply other threads:[~2014-03-25 8:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-25 8:25 [PATCH] drivers:bluetooth:ath3k.c: Fixed sparse warning for cast to restricted __le32 Surendra Patil
2014-03-25 8:32 ` Joe Perches [this message]
2014-03-25 8:38 ` Johan Hedberg
-- strict thread matches above, loose matches on Subject: below --
2014-03-26 6:36 [PATCH] drivers:bluetooth:ath3k.c " Surendra Patil
2014-03-26 7:21 ` Marcel Holtmann
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=1395736353.3010.6.camel@joe-AO722 \
--to=joe@perches.com \
--cc=gustavo@padovan.org \
--cc=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=surendra.tux@gmail.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