diff options
author | Arnd Bergmann <arnd@arndb.de> | 2020-04-08 20:58:58 +0200 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2020-04-17 16:34:01 +0200 |
commit | 0666e3c481a260359cd912f352f01a62eeb7974f (patch) | |
tree | 265091f79acdb1b40329dc3f68d28f87a871277e /drivers/lightnvm | |
parent | ARM: imx: provide v7_cpu_resume() only on ARM_CPU_SUSPEND=y (diff) | |
download | linux-0666e3c481a260359cd912f352f01a62eeb7974f.tar.xz linux-0666e3c481a260359cd912f352f01a62eeb7974f.zip |
soc: fsl: dpio: fix incorrect pointer conversions
Building dpio for 32 bit shows a new compiler warning from converting
a pointer to a u64:
drivers/soc/fsl/dpio/qbman-portal.c: In function 'qbman_swp_enqueue_multiple_desc_direct':
drivers/soc/fsl/dpio/qbman-portal.c:870:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
870 | addr_cena = (uint64_t)s->addr_cena;
The variable is not used anywhere, so removing the assignment seems
to be the correct workaround. After spotting what seemed to be
some confusion about address spaces, I ran the file through sparse,
which showed more warnings:
drivers/soc/fsl/dpio/qbman-portal.c:756:42: warning: incorrect type in argument 1 (different address spaces)
drivers/soc/fsl/dpio/qbman-portal.c:756:42: expected void const volatile [noderef] <asn:2> *addr
drivers/soc/fsl/dpio/qbman-portal.c:756:42: got unsigned int [usertype] *[assigned] p
drivers/soc/fsl/dpio/qbman-portal.c:902:42: warning: incorrect type in argument 1 (different address spaces)
drivers/soc/fsl/dpio/qbman-portal.c:902:42: expected void const volatile [noderef] <asn:2> *addr
drivers/soc/fsl/dpio/qbman-portal.c:902:42: got unsigned int [usertype] *[assigned] p
Here, the problem is passing a token from memremap() into __raw_readl(),
which is only defined to work on MMIO addresses but not RAM. Turning
this into a simple pointer dereference avoids this warning as well.
Link: https://lore.kernel.org/r/20200408185904.460563-1-arnd@arndb.de
Fixes: 3b2abda7d28c ("soc: fsl: dpio: Replace QMAN array mode with ring mode enqueue")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/lightnvm')
0 files changed, 0 insertions, 0 deletions