On Thu, Dec 17, 2020 at 04:59:21AM +0800, kernel test robot wrote:
> All errors (new ones prefixed by >>):
> 
>    In file included from arch/powerpc/include/asm/cacheflush.h:111,
>                     from include/linux/highmem.h:12,
>                     from include/linux/pagemap.h:11,
>                     from include/linux/blkdev.h:14,
>                     from include/linux/blk-cgroup.h:23,
>                     from include/linux/writeback.h:14,
>                     from include/linux/memcontrol.h:22,
>                     from include/linux/swap.h:9,
>                     from include/linux/suspend.h:5,
>                     from arch/powerpc/kernel/asm-offsets.c:23:
>    include/asm-generic/cacheflush.h: In function 'flush_dcache_folio':
> >> include/asm-generic/cacheflush.h:64:33: error: subscripted value is 
> >> neither array nor pointer nor vector
>       64 |   flush_dcache_page(&folio->page[--n]);

Thanks.  Apparently I need to compile on more than just x86 ;-)

This compiles on aargh64:

@@ -61,7 +61,8 @@ static inline void flush_dcache_folio(struct folio *folio)
        unsigned int n = folio_nr_pages(folio);
 
        do {
-               flush_dcache_page(&folio->page[--n]);
+               n--;
+               flush_dcache_page(&folio->page + n);
        } while (n);
 }
 #endif

I'll fold it into my git tree.

Reply via email to