Re: [PATCH v6 05/12] regmap: irq: Remove unreachable goto

Andy Shevchenko
2025-04-09T15:56:14Z

On Wed, Apr 09, 2025 at 06:38:33PM +0300, Andy Shevchenko wrote:
> On Wed, Apr 09, 2025 at 04:19:27PM +0100, Mark Brown wrote:
> > On Wed, Apr 09, 2025 at 04:55:52PM +0200, Mathieu Dubois-Briand wrote:
> > > BUG() never returns, so code after it is unreachable: remove it.
> >
> > BUG() can be compiled out, CONFIG_BUG.
>
> Yes, and it's still has unreachable() there. So, this change is correct.
> See include/asm-generic/bug.h for the details of the implementation.
> And yes, if we have an architecture that does not do this way, it has to
> be fixed.

FWIW, I just have briefly checked the architectures and all of them include
asm-generic/bug.h independently on the configuration option, some of them
even define BUG() despite the configuration option (e.g. arc).

--
With Best Regards,
Andy Shevchenko