Re: [PATCH v2] MIPS: SiByte: Fix missing function prototypes

From: Thomas Bogendoerfer

Date: Thu Nov 19 2026 - 10:10:04 EST


On Wed, Nov 18, 2026 at 05:13:26PM -0800, Florian Fainelli wrote:
> On 11/17/26 17:57, Maciej W. Rozycki wrote:
> > On Fri, 13 Nov 2026, Florian Fainelli wrote:
> >
> > > The SB1250 SWARM build reports missing prototypes for platform time
> > > initialization, SoC setup, IRQ and SMP helpers, and both RTC backends.
> >
> > Thank you for doing this. I've meant to for a long time, but have been
> > distracted with higher priority stuff.
> >
> > > 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.
>
> Thomas, I can send a v3 as an incremental fixup or complete replacement?

incremental fixup please

Thomas.

--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]