1
0
Fork 0

mfd: sun4i-gpadc: Fix 'cast from pointer to integer of different size' warning

When building for X86 using COMPILE_TEST we get this warning:

../drivers/mfd/sun4i-gpadc.c: In function ‘sun4i_gpadc_probe’:
../drivers/mfd/sun4i-gpadc.c:110:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]

Since an integer and a pointer are difference sizes on 64bit architectures.

Convert to case to a long instead.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
4.11.x+fslc
Lee Jones 2016-10-26 17:07:35 +01:00
parent 41751b033a
commit e8ae79d674
1 changed files with 1 additions and 1 deletions

View File

@ -107,7 +107,7 @@ static int sun4i_gpadc_probe(struct platform_device *pdev)
if (!of_id)
return -EINVAL;
switch ((int)of_id->data) {
switch ((long)of_id->data) {
case ARCH_SUN4I_A10:
cells = sun4i_gpadc_cells;
size = ARRAY_SIZE(sun4i_gpadc_cells);