diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-06-22 17:58:09 +0900 |
---|---|---|
committer | Jaehoon Chung <jh80.chung@samsung.com> | 2017-07-19 19:13:59 +0900 |
commit | aae6f016a7928edc79dff78d1235103fff282a34 (patch) | |
tree | dddf2d281fd1a2c1e317b8dbed4603bdbb68b4ea /drivers/mmc | |
parent | 207d8b35330f05265d099aadb8d4c2505a403bea (diff) | |
download | u-boot-aae6f016a7928edc79dff78d1235103fff282a34.tar.gz u-boot-aae6f016a7928edc79dff78d1235103fff282a34.tar.bz2 u-boot-aae6f016a7928edc79dff78d1235103fff282a34.zip |
mmc: cadence: use fdt32_t for DT property value to fix sparse warning
DTB is encoded in big endian. When we retrieve property values,
we need to use fdt32_to_cpu (aka be32_to_cpu) for endian conversion.
This is a bit error-prone, but sparse is useful to detect endian
mismatch.
We need to use (fdt32_t *) instead of (u32 *) for a pointer of a
property value. Otherwise sparse warns "cast to restricted __be32".
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/sdhci-cadence.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/sdhci-cadence.c b/drivers/mmc/sdhci-cadence.c index 4bd2623eae..f83c1d7241 100644 --- a/drivers/mmc/sdhci-cadence.c +++ b/drivers/mmc/sdhci-cadence.c @@ -92,7 +92,7 @@ static int sdhci_cdns_write_phy_reg(struct sdhci_cdns_plat *plat, static int sdhci_cdns_phy_init(struct sdhci_cdns_plat *plat, const void *fdt, int nodeoffset) { - const u32 *prop; + const fdt32_t *prop; int ret, i; for (i = 0; i < ARRAY_SIZE(sdhci_cdns_phy_cfgs); i++) { |