Return-Path: Received: from mail-sn1nam01on0095.outbound.protection.outlook.com ([104.47.32.95]:42182 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933244AbeCCW21 (ORCPT ); Sat, 3 Mar 2018 17:28:27 -0500 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Bjorn Andersson , Lee Jones , Sasha Levin Subject: [PATCH AUTOSEL for 4.14 30/84] leds: pm8058: Silence pointer to integer size warning Date: Sat, 3 Mar 2018 22:26:17 +0000 Message-ID: <20180303222518.26271-30-alexander.levin@microsoft.com> References: <20180303222518.26271-1-alexander.levin@microsoft.com> In-Reply-To: <20180303222518.26271-1-alexander.levin@microsoft.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: From: Bjorn Andersson [ Upstream commit 8f52df50d9366f770a894d14ef724e5e04574e98 ] The pointer returned by of_device_get_match_data() doesn't have the same size as u32 on 64-bit architectures, causing a compile warning when compile-testing the driver on such platform. Cast the return value of of_device_get_match_data() to unsigned long and then to u32 to silence this warning. Fixes: 7f866986e705 ("leds: add PM8058 LEDs driver") Signed-off-by: Bjorn Andersson Reviewed-by: Linus Walleij Acked-by: Pavel Machek Signed-off-by: Lee Jones Signed-off-by: Sasha Levin --- drivers/leds/leds-pm8058.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/leds/leds-pm8058.c b/drivers/leds/leds-pm8058.c index a52674327857..8988ba3b2d65 100644 --- a/drivers/leds/leds-pm8058.c +++ b/drivers/leds/leds-pm8058.c @@ -106,7 +106,7 @@ static int pm8058_led_probe(struct platform_device *pde= v) if (!led) return -ENOMEM; =20 - led->ledtype =3D (u32)of_device_get_match_data(&pdev->dev); + led->ledtype =3D (u32)(unsigned long)of_device_get_match_data(&pdev->dev)= ; =20 map =3D dev_get_regmap(pdev->dev.parent, NULL); if (!map) { --=20 2.14.1