Re: [PATCH v2] MIPS: SiByte: Fix missing function prototypes
From: Maciej W. Rozycki
Date: Thu Nov 19 2026 - 03:32:22 EST
On Wed, 18 Nov 2026, Florian Fainelli wrote:
> > > static inline int __maybe_unused bcm1250_m3_war(void)
> > > {
> > > - if (IS_ENABLED(CONFIG_SB1_PASS_2_WORKAROUNDS))
> > > - return sb1250_m3_workaround_needed();
> > > +#ifdef CONFIG_SB1_PASS_2_WORKAROUNDS
> > > + return sb1250_m3_workaround_needed();
> > > +#else
> > > return 0;
> > > +#endif
> > > }
> >
> > It seems a style regression, why is this change needed?
>
> The declaration is wrapped under #ifdef CONFIG_SB1_PASS_2_WORKAROUNDS, which
> would hide the prototype when the option was disabled. The if (IS_ENABLED()
> would not compile in that case since we would have lacked a visible
> declaration. We could keep this and just make the prototype unconditionally
> visible instead.
I've pondered it a bit more and I'm not entirely happy with the use of a
platform header in generic code in the first place. Would <asm/bugs.h> be
a better place for the prototype?
Maciej