Re: [PATCH v1 1/2] irqdomain: Unify checks for bus_token

From: Andy Shevchenko
Date: Tue Aug 13 2024 - 04:58:58 EST


On Tue, Aug 13, 2024 at 10:32:44AM +0200, Thomas Gleixner wrote:
> On Mon, Aug 12 2024 at 22:29, Andy Shevchenko wrote:
> > The code uses if (bus_token) and if (bus_token == DOMAIN_BUS_ANY).
> > Since bus_token is enum, the later is more robust against changes.
> > Unify all checks to follow the latter variant.
> >
> > Fixes: 0b21add71bd9 ("irqdomain: Handle domain bus token in irq_domain_create()")
> > Fixes: 1bf2c9282927 ("irqdomain: Cleanup domain name allocation")
>
> I'm fine with the change per se, but what does this fix? It's correct
> code, no?

Technically yes, it's correct code as long as nobody touches the mentioned enum.
It fixes the style and makes it robust against the changes.

--
With Best Regards,
Andy Shevchenko