mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 21:51:40 +00:00
nvmem: u-boot-env: fix crc32 casting type
This fixes:
drivers/nvmem/u-boot-env.c:141:17: sparse: sparse: cast to restricted __le32
Fixes: d5542923f2
("nvmem: add driver handling U-Boot environment variables")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220916122100.170016-14-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
9e8f208ad5
commit
3717ca3e0c
@ -139,7 +139,7 @@ static int u_boot_env_parse(struct u_boot_env *priv)
|
||||
data_offset = offsetof(struct u_boot_env_image_redundant, data);
|
||||
break;
|
||||
}
|
||||
crc32 = le32_to_cpu(*(uint32_t *)(buf + crc32_offset));
|
||||
crc32 = le32_to_cpu(*(__le32 *)(buf + crc32_offset));
|
||||
crc32_data_len = priv->mtd->size - crc32_data_offset;
|
||||
data_len = priv->mtd->size - data_offset;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user