mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: alexander.levin@verizon.com
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Cc: Franck Demathieu <fdemathieu@gmail.com>,
	Marc Zyngier <marc.zyngier@arm.com>,
	alexander.levin@verizon.com
Subject: [PATCH AUTOSEL for 4.4 16/32] irqchip/crossbar: Fix incorrect type of register size
Date: Wed, 29 Nov 2017 17:21:51 +0000	[thread overview]
Message-ID: <20171129172141.28925-16-alexander.levin@verizon.com> (raw)
In-Reply-To: <20171129172141.28925-1-alexander.levin@verizon.com>

From: Franck Demathieu <fdemathieu@gmail.com>

[ 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 argument 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 *<noident>

Signed-off-by: Franck Demathieu <fdemathieu@gmail.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
 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 63faee04a008..636187a4c1a3 100644
--- a/drivers/irqchip/irq-crossbar.c
+++ b/drivers/irqchip/irq-crossbar.c
@@ -199,7 +199,7 @@ static const struct irq_domain_ops crossbar_domain_ops = {
 static int __init crossbar_of_init(struct device_node *node)
 {
 	int i, size, reserved = 0;
-	u32 max = 0, entry;
+	u32 max = 0, entry, reg_size;
 	const __be32 *irqsr;
 	int ret = -ENOMEM;
 
@@ -276,9 +276,9 @@ static int __init crossbar_of_init(struct device_node *node)
 	if (!cb->register_offsets)
 		goto err_irq_map;
 
-	of_property_read_u32(node, "ti,reg-size", &size);
+	of_property_read_u32(node, "ti,reg-size", &reg_size);
 
-	switch (size) {
+	switch (reg_size) {
 	case 1:
 		cb->write = crossbar_writeb;
 		break;
@@ -304,7 +304,7 @@ static int __init crossbar_of_init(struct device_node *node)
 			continue;
 
 		cb->register_offsets[i] = reserved;
-		reserved += size;
+		reserved += reg_size;
 	}
 
 	of_property_read_u32(node, "ti,irqs-safe-map", &cb->safe_map);
-- 
2.11.0

  parent reply	other threads:[~2017-11-29 17:23 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-29 17:21 [PATCH AUTOSEL for 4.4 01/32] vti6: Don't report path MTU below IPV6_MIN_MTU alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 03/32] x86/hpet: Prevent might sleep splat on resume alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 04/32] selftest/powerpc: Fix false failures for skipped tests alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 02/32] ARM: OMAP2+: gpmc-onenand: propagate error on initialization failure alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 06/32] ARM: OMAP2+: Fix device node reference counts alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 07/32] ARM: OMAP2+: Release device node after it is no longer needed alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 05/32] module: set __jump_table alignment to 8 alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 08/32] gpio: altera: Use handle_level_irq when configured as a level_high alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 11/32] USB: gadgetfs: Fix a potential memory leak in 'dev_config()' alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 12/32] kvm: nVMX: VMCLEAR should not cause the vCPU to shut down alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 10/32] usb: gadget: configs: plug memory leak alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 09/32] HID: chicony: Add support for another ASUS Zen AiO keyboard alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 14/32] workqueue: trigger WARN if queue_delayed_work() is called with NULL @wq alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 15/32] scsi: lpfc: Fix crash during Hardware error recovery on SLI3 adapters alexander.levin
2017-11-29 17:21 ` alexander.levin [this message]
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 13/32] libata: drop WARN from protocol error in ata_sff_qc_issue() alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 19/32] arm64: KVM: Survive unknown traps from guests alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 18/32] arm: " alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 17/32] KVM: nVMX: reset nested_run_pending if the vCPU is going to be reset alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 20/32] spi_ks8995: fix "BUG: key accdaa28 not in .data!" alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 23/32] bnx2x: do not rollback VF MAC/VLAN filters we did not configure alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 22/32] bnx2x: fix possible overrun of VFPF multicast addresses array alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 24/32] ipv6: reorder icmpv6_init() and ip6_mr_init() alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 21/32] bnx2x: prevent crash when accessing PTP with interface down alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 28/32] netfilter: don't track fragmented packets alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 27/32] zram: set physical queue limits to avoid array out of bounds accesses alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 26/32] i2c: riic: fix restart condition alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 29/32] axonram: Fix gendisk handling alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 25/32] crypto: s5p-sss - Fix completing crypto request in IRQ handler alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 32/32] EDAC, i5000, i5400: Fix use of MTR_DRAM_WIDTH macro alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 31/32] powerpc/powernv/ioda2: Gracefully fail if too many TCE levels requested alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 30/32] drm/amd/amdgpu: fix console deadlock if late init failed alexander.levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171129172141.28925-16-alexander.levin@verizon.com \
    --to=alexander.levin@verizon.com \
    --cc=fdemathieu@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®