Files
i2som-imx-linux/include/linux
Richard Fitzgerald 7fb82d7854 random32: Fix implicit truncation warning in prandom_seed_state()
[ Upstream commit d327ea15a3 ]

sparse generates the following warning:

 include/linux/prandom.h:114:45: sparse: sparse: cast truncates bits from
 constant value

This is because the 64-bit seed value is manipulated and then placed in a
u32, causing an implicit cast and truncation. A forced cast to u32 doesn't
prevent this warning, which is reasonable because a typecast doesn't prove
that truncation was expected.

Logical-AND the value with 0xffffffff to make explicit that truncation to
32-bit is intended.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20210525122012.6336-3-rf@opensource.cirrus.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-07-20 16:15:46 +02:00
..
2019-12-13 08:51:18 +01:00
2019-12-17 20:35:45 +01:00
2021-04-14 08:22:36 +02:00
2019-10-05 13:10:03 +02:00
2019-07-03 13:14:48 +02:00
2018-08-22 10:52:48 -07:00
2021-02-10 09:21:06 +01:00
2019-11-24 08:19:14 +01:00
2021-01-30 13:32:13 +01:00
2021-01-30 13:32:12 +01:00
2019-10-17 13:45:42 -07:00
2021-05-22 10:59:50 +02:00
2019-12-13 08:52:43 +01:00
2021-03-04 09:39:44 +01:00
2021-02-07 14:48:38 +01:00
2019-12-31 16:35:38 +01:00
2021-07-11 12:49:26 +02:00
2020-07-29 10:16:52 +02:00
2021-06-30 08:48:18 -04:00
2018-08-22 10:52:45 -07:00
2020-03-18 07:14:17 +01:00
2019-06-11 12:20:52 +02:00
2021-01-30 13:32:12 +01:00
2020-04-02 15:28:22 +02:00
2018-08-16 12:14:42 -07:00
2018-11-13 11:08:51 -08:00
2020-12-11 13:25:01 +01:00
2020-04-02 15:28:23 +02:00