1 From 60bbaad38109684b156e21112322e0a922f92cde Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
3 Date: Thu, 18 Aug 2022 06:38:37 +0200
4 Subject: [PATCH] nvmem: u-boot-env: fix crc32 casting type
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
10 drivers/nvmem/u-boot-env.c:141:17: sparse: sparse: cast to restricted __le32
12 Reported-by: kernel test robot <lkp@intel.com>
13 Fixes: f955dc1445069 ("nvmem: add driver handling U-Boot environment variables")
14 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
15 Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
17 drivers/nvmem/u-boot-env.c | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
20 --- a/drivers/nvmem/u-boot-env.c
21 +++ b/drivers/nvmem/u-boot-env.c
22 @@ -139,7 +139,7 @@ static int u_boot_env_parse(struct u_boo
23 data_offset = offsetof(struct u_boot_env_image_redundant, data);
26 - crc32 = le32_to_cpu(*(uint32_t *)(buf + crc32_offset));
27 + crc32 = le32_to_cpu(*(__le32 *)(buf + crc32_offset));
28 crc32_data_len = priv->mtd->size - crc32_data_offset;
29 data_len = priv->mtd->size - data_offset;