From: Jyri Sarha <jsarha@ti.com>
To: Mark Brown <broonie@kernel.org>
Cc: peter.ujfalusi@ti.com, liam.r.girdwood@linux.intel.com,
alsa-devel@alsa-project.org, linux-omap@vger.kernel.org
Subject: Re: [PATCH] ASoC: soc-core: Fix sparse warning in be32_to_cpup() call
Date: Thu, 17 Sep 2015 12:33:37 +0300 [thread overview]
Message-ID: <55FA88F1.10807@ti.com> (raw)
In-Reply-To: <20150917092229.GO11268@sirena.org.uk>
On 09/17/15 12:22, Mark Brown wrote:
> On Thu, Sep 17, 2015 at 11:02:57AM +0300, Jyri Sarha wrote:
>
>> val /= sizeof(u32);
>> for (i = 0; i < val; i++)
>> - if (be32_to_cpup(&of_slot_mask[i]))
>> + if (be32_to_cpup((__be32 *)&of_slot_mask[i]))
>> *mask |= (1 << i);
>>
>
> There was no changelog and this is setting off alarm bells since the
> cast just smashes warnings - are you sure we're not missing some other
> annotations and that a cast is the best thing here?
>
You are right, I was a bit hasty. It is better to declare of_slot_mask
to const __be32 * in the first place, instead of just const u32 * and
then casting it to something else.
I'll send a new patch shortly.
BR,
Jyri
prev parent reply other threads:[~2015-09-17 9:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-17 8:02 [PATCH] ASoC: soc-core: Fix sparse warning in be32_to_cpup() call Jyri Sarha
2015-09-17 9:22 ` Mark Brown
2015-09-17 9:33 ` Jyri Sarha [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=55FA88F1.10807@ti.com \
--to=jsarha@ti.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=liam.r.girdwood@linux.intel.com \
--cc=linux-omap@vger.kernel.org \
--cc=peter.ujfalusi@ti.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.