Re: arch/arm/mm/proc.c:82:6: error: conflicting types for 'cpu_arm920_reset'
From: Nathan Chancellor
Date: Wed Jun 26 2024 - 17:03:32 EST
On Wed, Jun 26, 2024 at 10:59:11PM +0200, Linus Walleij wrote:
> On Wed, Jun 26, 2024 at 7:21 PM Nathan Chancellor <nathan@xxxxxxxxxx> wrote:
>
> > Hmmm, it seems like the prototypes of the reset functions in
> > arch/arm/mm/proc.c are incorrect? This builds for me with the original
> > configuration and allmodconfig + CONFIG_CFI_CLANG=y.
>
> Incidentally I fixed it earlier today!
> https://lore.kernel.org/linux-arm-kernel/20240626-arm-proto-regression-v1-1-089c23ea13dd@xxxxxxxxxx/
Aha, I did not go searching like I normally do to see if a patch was
already sent for it, guess that would have saved me a little time :)
> I added you on Reported-by for now.
>
> > +void cpu_arm7tdmi_reset(unsigned long addr, bool hvc) __attribute__((noreturn));
>
> The attribute is not needed on the prototype AFAICT?
I think that in general, noreturn needs to be on prototypes, but for
this prototype/the sake of CFI, I don't think it matters. Sami is free
to correct me though.
Cheers,
Nathan