Re: linux-next: build warning after merge of the tip tree

Xin Li
2024-02-01T09:00:54Z

On 1/31/2024 4:14 PM, Stephen Rothwell wrote:
> Hi all,
>
> After merging the tip tree, today's linux-next build (x86_64 allmodconfig)
> produced this warning:
>
> vmlinux.o: warning: objtool: fred_extint+0x1c: call to array_index_mask_nospec.constprop.0() leaves .noinstr.text section
>
> Probably introduced by commit
>
> 6786137bf8fd ("x86/fred: FRED entry/exit and dispatch code")
>

The following patch gets rid of the warning.

Boris, should I send a format patch?

Thanks!
Xin

diff --git a/arch/x86/include/asm/barrier.h b/arch/x86/include/asm/barrier.h
index 0216f63a366b..fe1e7e3cc844 100644
--- a/arch/x86/include/asm/barrier.h
+++ b/arch/x86/include/asm/barrier.h
@@ -33,7 +33,7 @@
* Returns:
* 0 - (index < size)
*/
-static inline unsigned long array_index_mask_nospec(unsigned long index,
+static __always_inline unsigned long array_index_mask_nospec(unsigned
long index,
unsigned long size)
{
unsigned long mask;