aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/trace-event-scripting.c
diff options
context:
space:
mode:
authorArnd Bergmann <[email protected]>2018-09-27 12:09:26 +0200
committerBorislav Petkov <[email protected]>2018-09-28 10:09:27 +0200
commit8537bf10976c56c6e0cc8b05a835e58cbbb1d287 (patch)
tree35291df7131e0d25edcbd2b9651e43417129777c /tools/perf/util/trace-event-scripting.c
parentc4a3e94641449362ee970f521a2cdb0e8cd08690 (diff)
EDAC, altera: Work around int-to-pointer-cast warnings
The altera edac driver passes a token from a DT resource as resource_size_t into an SMC call, but casts it to an __iomem pointer and then a plain void pointer inbetween, mixing three or four incompatible types in the process. The compiler complains about one of the conversions: drivers/edac/altera_edac.c: In function 'altr_init_a10_ecc_block': drivers/edac/altera_edac.c:1053:10: error: cast to pointer from integer of \ different size [-Werror=int-to-pointer-cast] base = (void __iomem *)res.start; ^ drivers/edac/altera_edac.c: In function 'altr_edac_a10_probe': drivers/edac/altera_edac.c:2062:10: error: cast to pointer from integer of \ different size [-Werror=int-to-pointer-cast] base = (void __iomem *)res.start; Using a static checker probably also notices the __iomem cast. Solving this properly isn't trivial, but simply casting to a 'uintptr_t' instead of 'void __iomem *' makes it less wrong and should avoid the warnings. Fixes: d5fc9125566c ("EDAC, altera: Combine Stratix10 and Arria10 probe functions") Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Reviewed-by: Thor Thayer <[email protected]> Cc: Mauro Carvalho Chehab <[email protected]> Cc: David Frey <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Christophe JAILLET <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions