On Tue, Mar 17, 2020 at 03:38:46PM +0100, Christophe Leroy wrote: > > diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c > > index f62de06e3d07..9934659cb871 100644 > > --- a/arch/powerpc/mm/pgtable_32.c > > +++ b/arch/powerpc/mm/pgtable_32.c > > @@ -29,11 +29,27 @@ > > #include <asm/fixmap.h> > > #include <asm/setup.h> > > #include <asm/sections.h> > > +#include <asm/early_ioremap.h> > > #include <mm/mmu_decl.h> > > extern char etext[], _stext[], _sinittext[], _einittext[]; > > +static u8 early_fixmap_pagetable[FIXMAP_PTE_SIZE] __page_aligned_data; > > Sparse reports this as a variable size array. This is definitely not. Gcc > properly sees it is an 8k table (2 pages).
Yes, thing is that FIXMAP_PTE_SIZE is not that constant since it uses __builtin_ffs() (via PTE_SHIFT / PTE_T_LOG2). Nevertheless, since Sparse v0.6.1 (released in October) accepts these in constant expressions, like GCC does. -- Luc