ath25: switch default kernel to 5.15
[openwrt/staging/ldir.git] / target / linux / generic / backport-5.10 / 811-v6.1-0009-nvmem-u-boot-env-fix-crc32-casting-type.patch
1 From 3717ca3e0cc8683f93b41d3f06ca79631eb58715 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
3 Date: Fri, 16 Sep 2022 13:21:00 +0100
4 Subject: [PATCH] nvmem: u-boot-env: fix crc32 casting type
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 This fixes:
10 drivers/nvmem/u-boot-env.c:141:17: sparse: sparse: cast to restricted __le32
11
12 Fixes: d5542923f200 ("nvmem: add driver handling U-Boot environment variables")
13 Reported-by: kernel test robot <lkp@intel.com>
14 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
15 Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
16 Link: https://lore.kernel.org/r/20220916122100.170016-14-srinivas.kandagatla@linaro.org
17 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
18 ---
19 drivers/nvmem/u-boot-env.c | 2 +-
20 1 file changed, 1 insertion(+), 1 deletion(-)
21
22 --- a/drivers/nvmem/u-boot-env.c
23 +++ b/drivers/nvmem/u-boot-env.c
24 @@ -139,7 +139,7 @@ static int u_boot_env_parse(struct u_boo
25 data_offset = offsetof(struct u_boot_env_image_redundant, data);
26 break;
27 }
28 - crc32 = le32_to_cpu(*(uint32_t *)(buf + crc32_offset));
29 + crc32 = le32_to_cpu(*(__le32 *)(buf + crc32_offset));
30 crc32_data_len = priv->mtd->size - crc32_data_offset;
31 data_len = priv->mtd->size - data_offset;
32