lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87sfn14cns.wl-maz@kernel.org>
Date:   Sat, 16 Jul 2022 10:41:59 +0100
From:   Marc Zyngier <maz@...nel.org>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     Antonio Borneo <antonio.borneo@...s.st.com>,
        linux-kernel@...r.kernel.org,
        linux-stm32@...md-mailman.stormreply.com,
        linux-arm-kernel@...ts.infradead.org,
        Thomas Gleixner <tglx@...utronix.de>,
        Maxime Coquelin <mcoquelin.stm32@...il.com>,
        Alexandre Torgue <alexandre.torgue@...s.st.com>
Subject: Re: [PATCH v1 1/1] irqchip/stm32-exti: Use INVALID_HWIRQ definition

On Fri, 15 Jul 2022 21:52:03 +0100,
Andy Shevchenko <andriy.shevchenko@...ux.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@...ux.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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ