summaryrefslogtreecommitdiff
path: root/drivers/nvmem
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2022-09-16 13:21:00 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-09-24 14:56:37 +0200
commit3717ca3e0cc8683f93b41d3f06ca79631eb58715 (patch)
tree545b33b64ce50587858000b0d04118b4dd8869c0 /drivers/nvmem
parent9e8f208ad5229ddda97cd4a83ecf89c735d99592 (diff)
downloadlinux-rpi-3717ca3e0cc8683f93b41d3f06ca79631eb58715.tar.gz
linux-rpi-3717ca3e0cc8683f93b41d3f06ca79631eb58715.tar.bz2
linux-rpi-3717ca3e0cc8683f93b41d3f06ca79631eb58715.zip
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: d5542923f200 ("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>
Diffstat (limited to 'drivers/nvmem')
-rw-r--r--drivers/nvmem/u-boot-env.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvmem/u-boot-env.c b/drivers/nvmem/u-boot-env.c
index d17a164ae705..8e72d1bbd649 100644
--- a/drivers/nvmem/u-boot-env.c
+++ b/drivers/nvmem/u-boot-env.c
@@ -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;