From: Marc Zyngier <maz@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Antonio Borneo <antonio.borneo@foss.st.com>,
linux-kernel@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
Thomas Gleixner <tglx@linutronix.de>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>
Subject: Re: [PATCH v1 1/1] irqchip/stm32-exti: Use INVALID_HWIRQ definition
Date: Sat, 16 Jul 2022 10:41:59 +0100 [thread overview]
Message-ID: <87sfn14cns.wl-maz@kernel.org> (raw)
In-Reply-To: <20220715205203.82591-1-andriy.shevchenko@linux.intel.com>
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
next prev parent reply other threads:[~2022-07-16 9:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2022-07-18 19:13 ` Andy Shevchenko
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=87sfn14cns.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=alexandre.torgue@foss.st.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=antonio.borneo@foss.st.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--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;
as well as URLs for NNTP newsgroup(s).