On Apr 24 2018 21:57, Takashi Sakamoto wrote:
Hi,
On Apr 24 2018 20:49, Takashi Iwai wrote:
On Sun, 22 Apr 2018 20:25:36 +0200, kbuild test robot wrote:
sparse warnings: (new ones prefixed by >>)
sound/firewire/dice/dice-transaction.c:334:21: sparse: restricted __be32 degrades to integer
sound/firewire/dice/dice-transaction.c:336:21: sparse: restricted __be32 degrades to integer
vim +334 sound/firewire/dice/dice-transaction.c
(snip)
333 /* Old firmware doesn't support these fields. */ > 334 if (pointers[7] > 0) 335 dice->sync_offset = be32_to_cpu(pointers[6]) * 4; 336 if (pointers[9] > 0) 337 dice->rsrv_offset = be32_to_cpu(pointers[8]) * 4;
The warning looks reasonable.
Yep. The integer value can be negative.
Alternatively, you can rewrite it as a non-zero check: if (pointers[7]) .... Then it would be OK without endian conversion.
OK. I'll repost.
I reposted it now and it's blasted[1]. Please evaluate and apply it instead of the one which I mistook to send.
[1] http://mailman.alsa-project.org/pipermail/alsa-devel/2018-April/134936.html
Thanks
Takashi Sakamoto