edac: altera: Fix ARM64 warning
Subsystems (2)
PATCH 1/1 edac: altera: Fix ARM64 warning
From: Thor Thayer <[email protected]>
The kbuild test robot reported the following warning on altera_edac.c:
drivers//edac/altera_edac.c: In function 'ocram_free_mem':drivers//edac/altera_edac.c:1410:42: warning: cast from pointer to integer
of different size [-Wpointer-to-int-cast]
gen_pool_free((struct gen_pool *)other, (u32)p, size);
^^^After adding support for ARM64 architectures, the unsigned long parameter is 64bits and causes a build warning with arm64-allyesconfig Fix by casting to the correct size (unsigned long) instead of u32.
--- drivers/edac/altera_edac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/edac/altera_edac.c +1 -1
@@ -1415,7 +1415,7 @@ static void *ocram_alloc_mem(size_t size, void **other)static void ocram_free_mem (void *p,size_t size,void *other) { -gen_pool_free ((struct gen_pool *)other, (u32 )p, size); +gen_pool_free ((struct gen_pool *)other, (unsigned long )p, size); }static const struct edac_device_prv_data ocramecc_data = {
Signature · 1 line
2.7.4
PATCH 1/1 edac: altera: Fix ARM64 warning
Quoted 13 lines · thor.thayer at linux.intel.com
From: Thor Thayer <[email protected]>
The kbuild test robot reported the following warning on
altera_edac.c:
drivers//edac/altera_edac.c: In function 'ocram_free_mem':drivers//edac/altera_edac.c:1410:42: warning: cast from pointer to integer
of different size [-Wpointer-to-int-cast]gen_pool_free((struct gen_pool *)other, (u32)p, size); ^^^After adding support for ARM64 architectures, the unsigned long parameter is 64bits and causes a build warning with arm64-allyesconfig Fix by casting to the correct size (unsigned long) instead of u32.
Quoted 6 lines
Reported-by kbuild test robot <[email protected]>Fixes c3eea1942a16 ("EDAC, altera: Add Altera L2 cache and OCRAM support")Signed-off-by Thor Thayer <[email protected]>--- drivers/edac/altera_edac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks.
Signature · 4 lines
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.