Re: [PATCH v3 1/7] mfd: Add core driver for Nuvoton NCT6694

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Linus,

Thank you for your reply,

Linus Walleij <linus.walleij@xxxxxxxxxx> 於 2024年12月20日 週五 下午8:45寫道:
>
> Hi Ming,
>
> thanks for your patch!
>
...
> > +       while (*int_status) {
> > +               int irq = __ffs(*int_status);
> > +
> > +               if (*int_status & (1 << irq))
> > +                       generic_handle_irq_safe(irq_find_mapping(nct6694->domain, irq));
> > +
> > +               *int_status &= ~(1 << irq);
>
> What about doing what you do in the GPIO driver and
> #include <linux/bits.h>
>
> And search and replace "(1 << irq)" with BIT(irq)?
>
> PS the main reason we do this is because
>
> int a = (1 << 31);
>
> becomes a negative number on 32bit machines, and
> can lead to confusing side effects. BIT() always work
> on unsigned.
>

Understood! I will make the modifications in the v4.

Best regards,
Ming





[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux