* [PATCH v1 1/1] irqchip/stm32-exti: Use INVALID_HWIRQ definition
@ 2022-07-15 20:52 Andy Shevchenko
2022-07-16 9:41 ` Marc Zyngier
0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2022-07-15 20:52 UTC (permalink / raw)
To: Marc Zyngier, Antonio Borneo, linux-kernel, linux-stm32,
linux-arm-kernel
Cc: Thomas Gleixner, Maxime Coquelin, Alexandre Torgue,
Andy Shevchenko
Use specific definition for invalid IRQ. It makes the
code uniform in respect to the constant used for that.
No functional change intended.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/irqchip/irq-stm32-exti.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-stm32-exti.c b/drivers/irqchip/irq-stm32-exti.c
index a73763d475f0..a6ae9f38aaf0 100644
--- a/drivers/irqchip/irq-stm32-exti.c
+++ b/drivers/irqchip/irq-stm32-exti.c
@@ -170,7 +170,7 @@ static const struct stm32_exti_bank *stm32mp1_exti_banks[] = {
static struct irq_chip stm32_exti_h_chip;
static struct irq_chip stm32_exti_h_chip_direct;
-#define EXTI_INVALID_IRQ U8_MAX
+#define EXTI_INVALID_IRQ ((u8)INVALID_HWIRQ)
#define STM32MP1_DESC_IRQ_SIZE (ARRAY_SIZE(stm32mp1_exti_banks) * IRQS_PER_BANK)
static const u8 stm32mp1_desc_irq[] = {
--
2.35.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v1 1/1] irqchip/stm32-exti: Use INVALID_HWIRQ definition
2022-07-15 20:52 [PATCH v1 1/1] irqchip/stm32-exti: Use INVALID_HWIRQ definition Andy Shevchenko
@ 2022-07-16 9:41 ` Marc Zyngier
2022-07-18 19:13 ` Andy Shevchenko
0 siblings, 1 reply; 3+ messages in thread
From: Marc Zyngier @ 2022-07-16 9:41 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Antonio Borneo, linux-kernel, linux-stm32, linux-arm-kernel,
Thomas Gleixner, Maxime Coquelin, Alexandre Torgue
On Fri, 15 Jul 2022 21:52:03 +0100,
Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
>
> Use specific definition for invalid IRQ. It makes the
> code uniform in respect to the constant used for that.
> No functional change intended.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/irqchip/irq-stm32-exti.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/irqchip/irq-stm32-exti.c b/drivers/irqchip/irq-stm32-exti.c
> index a73763d475f0..a6ae9f38aaf0 100644
> --- a/drivers/irqchip/irq-stm32-exti.c
> +++ b/drivers/irqchip/irq-stm32-exti.c
> @@ -170,7 +170,7 @@ static const struct stm32_exti_bank *stm32mp1_exti_banks[] = {
> static struct irq_chip stm32_exti_h_chip;
> static struct irq_chip stm32_exti_h_chip_direct;
>
> -#define EXTI_INVALID_IRQ U8_MAX
> +#define EXTI_INVALID_IRQ ((u8)INVALID_HWIRQ)
This looks like a terrible idea. It gives the impression that you can
now rely on comparing the internal data structure field to
INVALID_HWIRQ. Which is of course bound to fail.
To be honest, I'd rather *kill* INVALID_HWIRQ, because apart from
cherryview, nobody even *checks* for this value by that name. So much
for the "code uniformity"...
M.
--
Without deviation from the norm, progress is not possible.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1 1/1] irqchip/stm32-exti: Use INVALID_HWIRQ definition
2022-07-16 9:41 ` Marc Zyngier
@ 2022-07-18 19:13 ` Andy Shevchenko
0 siblings, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2022-07-18 19:13 UTC (permalink / raw)
To: Marc Zyngier
Cc: Antonio Borneo, linux-kernel, linux-stm32, linux-arm-kernel,
Thomas Gleixner, Maxime Coquelin, Alexandre Torgue
On Sat, Jul 16, 2022 at 10:41:59AM +0100, Marc Zyngier wrote:
> On Fri, 15 Jul 2022 21:52:03 +0100,
> Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
> >
> > Use specific definition for invalid IRQ. It makes the
> > code uniform in respect to the constant used for that.
> > No functional change intended.
...
> > -#define EXTI_INVALID_IRQ U8_MAX
> > +#define EXTI_INVALID_IRQ ((u8)INVALID_HWIRQ)
>
> This looks like a terrible idea. It gives the impression that you can
> now rely on comparing the internal data structure field to
> INVALID_HWIRQ. Which is of course bound to fail.
I don't know how one can go to that conclusion, but okay, I understood you.
> To be honest, I'd rather *kill* INVALID_HWIRQ, because apart from
> cherryview, nobody even *checks* for this value by that name. So much
> for the "code uniformity"...
It's used by two or three, I don't remember by heart.
--
With Best Regards,
Andy Shevchenko
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-07-18 19:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-15 20:52 [PATCH v1 1/1] irqchip/stm32-exti: Use INVALID_HWIRQ definition Andy Shevchenko
2022-07-16 9:41 ` Marc Zyngier
2022-07-18 19:13 ` Andy Shevchenko
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).