* [PATCH] gpio: mvebu: fix warning when building on 64-bit
@ 2017-01-10 22:53 Russell King
2017-01-11 15:47 ` Linus Walleij
0 siblings, 1 reply; 2+ messages in thread
From: Russell King @ 2017-01-10 22:53 UTC (permalink / raw)
To: linux-arm-kernel
Casting a pointer to an int is not portable, and provokes a compiler
warning. Cast to unsigned long instead to avoid the warning.
drivers/gpio/gpio-mvebu.c: In function 'mvebu_gpio_probe':
drivers/gpio/gpio-mvebu.c:662:17: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
soc_variant = (int) match->data;
^
This will be needed when building gpio-mvebu for Armada 7k/8k ARM64
SoCs.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
Linus,
I don't think this is necessary to push into -rc, as its not yet used
on ARM64 - GPIO support is not yet present in the DTS files, and the
Kconfig doesn't allow the driver to be built on ARM64. Hence, please
queue for the next merge window as a low priority fix.
Thanks.
drivers/gpio/gpio-mvebu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
index 1ed6132b993c..a649556ac3ca 100644
--- a/drivers/gpio/gpio-mvebu.c
+++ b/drivers/gpio/gpio-mvebu.c
@@ -659,7 +659,7 @@ static int mvebu_gpio_probe(struct platform_device *pdev)
match = of_match_device(mvebu_gpio_of_match, &pdev->dev);
if (match)
- soc_variant = (int) match->data;
+ soc_variant = (unsigned long) match->data;
else
soc_variant = MVEBU_GPIO_SOC_VARIANT_ORION;
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread* [PATCH] gpio: mvebu: fix warning when building on 64-bit
2017-01-10 22:53 [PATCH] gpio: mvebu: fix warning when building on 64-bit Russell King
@ 2017-01-11 15:47 ` Linus Walleij
0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2017-01-11 15:47 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Jan 10, 2017 at 11:53 PM, Russell King
<rmk+kernel@armlinux.org.uk> wrote:
> Casting a pointer to an int is not portable, and provokes a compiler
> warning. Cast to unsigned long instead to avoid the warning.
>
> drivers/gpio/gpio-mvebu.c: In function 'mvebu_gpio_probe':
> drivers/gpio/gpio-mvebu.c:662:17: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
> soc_variant = (int) match->data;
> ^
>
> This will be needed when building gpio-mvebu for Armada 7k/8k ARM64
> SoCs.
>
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
> ---
> Linus,
>
> I don't think this is necessary to push into -rc, as its not yet used
> on ARM64 - GPIO support is not yet present in the DTS files, and the
> Kconfig doesn't allow the driver to be built on ARM64. Hence, please
> queue for the next merge window as a low priority fix.
Fair enough, queued for next. Thanks!
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-01-11 15:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-10 22:53 [PATCH] gpio: mvebu: fix warning when building on 64-bit Russell King
2017-01-11 15:47 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox