From: Joey Gouly <joey.gouly@arm.com>
To: <linux-gpio@vger.kernel.org>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Andy Shevchenko <andy.shevchenko@gmail.com>,
Hector Martin <marcan@marcan.st>, <nd@arm.com>,
Joey Gouly <joey.gouly@arm.com>
Subject: [PATCH v2 10/11] pinctrl: apple: use modulo rather than bitwise and
Date: Sun, 21 Nov 2021 16:56:41 +0000 [thread overview]
Message-ID: <20211121165642.27883-11-joey.gouly@arm.com> (raw)
In-Reply-To: <20211121165642.27883-1-joey.gouly@arm.com>
This expresses the intention clearer.
Signed-off-by: Joey Gouly <joey.gouly@arm.com>
Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
---
drivers/pinctrl/pinctrl-apple-gpio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/pinctrl-apple-gpio.c b/drivers/pinctrl/pinctrl-apple-gpio.c
index 8e794ebb47da..8a58c862c33a 100644
--- a/drivers/pinctrl/pinctrl-apple-gpio.c
+++ b/drivers/pinctrl/pinctrl-apple-gpio.c
@@ -252,7 +252,7 @@ static void apple_gpio_irq_ack(struct irq_data *data)
struct apple_gpio_pinctrl *pctl = gpiochip_get_data(irq_data_get_irq_chip_data(data));
unsigned int irqgrp = FIELD_GET(REG_GPIOx_GRP, apple_gpio_get_reg(pctl, data->hwirq));
- writel(BIT(data->hwirq & 31), pctl->base + REG_IRQ(irqgrp, data->hwirq));
+ writel(BIT(data->hwirq % 32), pctl->base + REG_IRQ(irqgrp, data->hwirq));
}
static unsigned int apple_gpio_irq_type(unsigned int type)
--
2.17.1
next prev parent reply other threads:[~2021-11-21 16:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-21 16:56 [PATCH v2 00/11] pinctrl: apple: misc fixes from post-commit review Joey Gouly
2021-11-21 16:56 ` [PATCH v2 01/11] pinctrl: apple: fix some formatting issues Joey Gouly
2021-11-21 16:56 ` [PATCH v2 02/11] pinctrl: apple: add missing comma Joey Gouly
2021-11-21 16:56 ` [PATCH v2 03/11] pinctrl: apple: use C style comment Joey Gouly
2021-11-21 16:56 ` [PATCH v2 04/11] pinctrl: apple: add missing bits.h header Joey Gouly
2021-11-21 16:56 ` [PATCH v2 05/11] pinctrl: apple: handle regmap_read errors Joey Gouly
2021-11-21 16:56 ` [PATCH v2 06/11] pinctrl: apple: make apple_gpio_get_direction more readable Joey Gouly
2021-11-21 16:56 ` [PATCH v2 07/11] pinctrl: apple: give error label a specific name Joey Gouly
2021-11-21 16:56 ` [PATCH v2 08/11] pinctrl: apple: remove gpio-controller check Joey Gouly
2021-11-21 16:56 ` [PATCH v2 09/11] pinctrl: apple: don't set gpio_chip.of_node Joey Gouly
2021-11-21 16:56 ` Joey Gouly [this message]
2021-11-21 16:56 ` [PATCH v2 11/11] pinctrl: apple: return an error if pinmux is missing in the DT Joey Gouly
2021-11-22 0:15 ` [PATCH v2 00/11] pinctrl: apple: misc fixes from post-commit review Linus Walleij
2021-11-26 0:53 ` Linus Walleij
2021-11-26 22:30 ` Joey Gouly
2021-11-27 0:01 ` Linus Walleij
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=20211121165642.27883-11-joey.gouly@arm.com \
--to=joey.gouly@arm.com \
--cc=andy.shevchenko@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=marcan@marcan.st \
--cc=nd@arm.com \
/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;
as well as URLs for NNTP newsgroup(s).