From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-eopbgr720115.outbound.protection.outlook.com ([40.107.72.115]:16848 "EHLO NAM05-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728159AbeIBRWR (ORCPT ); Sun, 2 Sep 2018 13:22:17 -0400 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Jae Hyun Yoo , Wolfram Sang , Sasha Levin Subject: [PATCH AUTOSEL 4.14 04/89] i2c: aspeed: Add an explicit type casting for *get_clk_reg_val Date: Sun, 2 Sep 2018 13:06:14 +0000 Message-ID: <20180902064918.183387-4-alexander.levin@microsoft.com> References: <20180902064918.183387-1-alexander.levin@microsoft.com> In-Reply-To: <20180902064918.183387-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: Jae Hyun Yoo [ Upstream commit 5799c4b2f1dbc0166d9b1d94443deaafc6e7a070 ] This commit fixes this sparse warning: drivers/i2c/busses/i2c-aspeed.c:875:38: warning: incorrect type in assignme= nt (different modifiers) drivers/i2c/busses/i2c-aspeed.c:875:38: expected unsigned int ( *get_clk= _reg_val )( ... ) drivers/i2c/busses/i2c-aspeed.c:875:38: got void const *const data Reported-by: Wolfram Sang Signed-off-by: Jae Hyun Yoo Reviewed-by: Brendan Higgins Signed-off-by: Wolfram Sang Signed-off-by: Sasha Levin --- drivers/i2c/busses/i2c-aspeed.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspee= d.c index 284f8670dbeb..2feae9a421e6 100644 --- a/drivers/i2c/busses/i2c-aspeed.c +++ b/drivers/i2c/busses/i2c-aspeed.c @@ -859,7 +859,7 @@ static int aspeed_i2c_probe_bus(struct platform_device = *pdev) if (!match) bus->get_clk_reg_val =3D aspeed_i2c_24xx_get_clk_reg_val; else - bus->get_clk_reg_val =3D match->data; + bus->get_clk_reg_val =3D (u32 (*)(u32))match->data; =20 /* Initialize the I2C adapter */ spin_lock_init(&bus->lock); --=20 2.17.1