24 Apr
2018
24 Apr
'18
3:57 p.m.
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.
Thanks
Takashi Sakamoto