Re: [PATCH] [v2] x86: xen: add missing prototypes

From: Arnd Bergmann
Date: Wed May 24 2023 - 04:20:38 EST

On Wed, May 24, 2023, at 01:09, Boris Ostrovsky wrote:
> On 5/23/23 4:37 PM, Arnd Bergmann wrote:
>> On Sat, May 20, 2023, at 00:24, Boris Ostrovsky wrote:
>>> On 5/19/23 5:28 AM, Arnd Bergmann wrote:
>> Not sure if there is much point for the second one, since
>> it's only called from assembler, so the #else path is
>> never seen, but I can do that for consistency if you
>> like.
>> I generally prefer to avoid the extra #if checks
>> when there is no strict need for an empty stub.
> Do we need the empty stubs? Neither of these should be referenced if
> !SMP (or more precisely if !CONFIG_XEN_PV_SMP)

We don't need the prototypes at all for building, they
are only there to avoid the missing-prototype warning!

I added the stubs in v3 because you asked for an #ifdef,
and having an #ifdef without an else clause seemed even
weirder: that would only add complexity for something that
is already unused while making it harder to maintain or
use if an actual user comes up.

I'll let someone else figure out what you actually want