mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "irqchip-bot for Stephen Rothwell" <tip-bot2@linutronix.de>
To: linux-kernel@vger.kernel.org
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
	Marc Zyngier <maz@kernel.org>,
	tglx@linutronix.de
Subject: [irqchip: irq/irqchip-next] pinctrl: npcm: Fix broken typing on 64bit platforms
Date: Thu, 17 Mar 2022 09:47:27 -0000	[thread overview]
Message-ID: <164751044707.389.16417510835118111853.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20220316183227.725bfd37@canb.auug.org.au>

The following commit has been merged into the irq/irqchip-next branch of irqchip:

Commit-ID:     1c3b5c62fc856e8ba71f071d1cf37b2d88411e8b
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/1c3b5c62fc856e8ba71f071d1cf37b2d88411e8b
Author:        Stephen Rothwell <sfr@canb.auug.org.au>
AuthorDate:    Wed, 16 Mar 2022 18:12:14 +11:00
Committer:     Marc Zyngier <maz@kernel.org>
CommitterDate: Thu, 17 Mar 2022 08:20:39 

pinctrl: npcm: Fix broken typing on 64bit platforms

The npcm driver confuses u32 and unsigned long, which works on
32bit platforms, but leads to disasters on 64bit systems (and
breaks the build if using -Werror=array-bounds).

Use proper typing to address the issue.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
[maz: commit message, additional changes suggested by Jonathan Neuschäfer]
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220316183227.725bfd37@canb.auug.org.au
---
 drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
index ba536fd..a9831da 100644
--- a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
+++ b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
@@ -216,7 +216,7 @@ static void npcmgpio_irq_handler(struct irq_desc *desc)
 	struct gpio_chip *gc;
 	struct irq_chip *chip;
 	struct npcm7xx_gpio *bank;
-	u32 sts, en, bit;
+	unsigned long sts, bit, en;
 
 	gc = irq_desc_get_handler_data(desc);
 	bank = gpiochip_get_data(gc);
@@ -225,11 +225,11 @@ static void npcmgpio_irq_handler(struct irq_desc *desc)
 	chained_irq_enter(chip, desc);
 	sts = ioread32(bank->base + NPCM7XX_GP_N_EVST);
 	en  = ioread32(bank->base + NPCM7XX_GP_N_EVEN);
-	dev_dbg(bank->gc.parent, "==> got irq sts %.8x %.8x\n", sts,
+	dev_dbg(bank->gc.parent, "==> got irq sts %.8lx %.8lx\n", sts,
 		en);
 
 	sts &= en;
-	for_each_set_bit(bit, (const void *)&sts, NPCM7XX_GPIO_PER_BANK)
+	for_each_set_bit(bit, &sts, NPCM7XX_GPIO_PER_BANK)
 		generic_handle_domain_irq(gc->irq.domain, bit);
 	chained_irq_exit(chip, desc);
 }

      parent reply	other threads:[~2022-03-17  9:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-16  7:32 linux-next: build failure after merge of the kspp tree Stephen Rothwell
2022-03-16 12:00 ` linux-next: build failure after merge of the kspp tree (in pinctrl-npcm7xx) Jonathan Neuschäfer
2022-03-17  1:01 ` linux-next: build failure after merge of the kspp tree Linus Walleij
2022-03-17  8:24   ` Marc Zyngier
2022-03-17  9:47 ` irqchip-bot for Stephen Rothwell [this message]

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=164751044707.389.16417510835118111853.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=sfr@canb.auug.org.au \
    --cc=tglx@linutronix.de \
    /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®