Return-Path: Received: from mail-by2nam01on0108.outbound.protection.outlook.com ([104.47.34.108]:47424 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932556AbeARVD7 (ORCPT ); Thu, 18 Jan 2018 16:03:59 -0500 From: Sasha Levin To: "stable@vger.kernel.org" , "stable-commits@vger.kernel.org" CC: Franck Demathieu , Marc Zyngier , Sasha Levin Subject: [added to the 4.1 stable tree] irqchip/crossbar: Fix incorrect type of register size Date: Thu, 18 Jan 2018 21:00:58 +0000 Message-ID: <20180118205908.3220-177-alexander.levin@microsoft.com> References: <20180118205908.3220-1-alexander.levin@microsoft.com> In-Reply-To: <20180118205908.3220-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: Franck Demathieu This patch has been added to the stable tree. If you have any objections, please let us know. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D [ Upstream commit 4b9de5da7e120c7f02395da729f0ec77ce7a6044 ] The 'size' variable is unsigned according to the dt-bindings. As this variable is used as integer in other places, create a new variable that allows to fix the following sparse issue (-Wtypesign): drivers/irqchip/irq-crossbar.c:279:52: warning: incorrect type in argumen= t 3 (different signedness) drivers/irqchip/irq-crossbar.c:279:52: expected unsigned int [usertype= ] *out_value drivers/irqchip/irq-crossbar.c:279:52: got int * Signed-off-by: Franck Demathieu Signed-off-by: Marc Zyngier Signed-off-by: Sasha Levin --- drivers/irqchip/irq-crossbar.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/irqchip/irq-crossbar.c b/drivers/irqchip/irq-crossbar.= c index 2f7dffaae93a..5ba30449ee53 100644 --- a/drivers/irqchip/irq-crossbar.c +++ b/drivers/irqchip/irq-crossbar.c @@ -194,7 +194,7 @@ static const struct irq_domain_ops crossbar_domain_ops = =3D { static int __init crossbar_of_init(struct device_node *node) { int i, size, reserved =3D 0; - u32 max =3D 0, entry; + u32 max =3D 0, entry, reg_size; const __be32 *irqsr; int ret =3D -ENOMEM; =20 @@ -271,9 +271,9 @@ static int __init crossbar_of_init(struct device_node *= node) if (!cb->register_offsets) goto err_irq_map; =20 - of_property_read_u32(node, "ti,reg-size", &size); + of_property_read_u32(node, "ti,reg-size", ®_size); =20 - switch (size) { + switch (reg_size) { case 1: cb->write =3D crossbar_writeb; break; @@ -299,7 +299,7 @@ static int __init crossbar_of_init(struct device_node *= node) continue; =20 cb->register_offsets[i] =3D reserved; - reserved +=3D size; + reserved +=3D reg_size; } =20 of_property_read_u32(node, "ti,irqs-safe-map", &cb->safe_map); --=20 2.11.0