[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAGsJ_4yDk1+axbte7FKQEwD7X2oxUCFrEc9M5YOS1BobfDFXPA@mail.gmail.com>
Date: Tue, 12 Mar 2024 20:57:34 +1300
From: Barry Song <21cnbao@...il.com>
To: Huacai Chen <chenhuacai@...ngson.cn>, chris@...kel.net,
Max Filippov <jcmvbkbc@...il.com>
Cc: Arnd Bergmann <arnd@...db.de>, Huacai Chen <chenhuacai@...nel.org>, loongarch@...ts.linux.dev,
linux-arch@...r.kernel.org, Xuefeng Li <lixuefeng@...ngson.cn>,
Guo Ren <guoren@...nel.org>, Xuerui Wang <kernel@...0n.name>,
Jiaxun Yang <jiaxun.yang@...goat.com>, linux-kernel@...r.kernel.org,
loongson-kernel@...ts.loongnix.cn, kernel test robot <lkp@...el.com>
Subject: Re: [PATCH] LoongArch: Remove superfluous flush_dcache_page() definition
On Tue, Mar 12, 2024 at 8:31 PM Huacai Chen <chenhuacai@...ngson.cn> wrote:
>
> LoongArch doesn't have cache aliases, so flush_dcache_page() is a no-op.
> There is a generic implementation for this case in include/asm-generic/
> cacheflush.h. So remove the superfluous flush_dcache_page() definition,
> which also silences such build warnings:
>
> In file included from crypto/scompress.c:12:
> include/crypto/scatterwalk.h: In function 'scatterwalk_pagedone':
> include/crypto/scatterwalk.h:76:30: warning: variable 'page' set but not used [-Wunused-but-set-variable]
> 76 | struct page *page;
> | ^~~~
> crypto/scompress.c: In function 'scomp_acomp_comp_decomp':
> >> crypto/scompress.c:174:38: warning: unused variable 'dst_page' [-Wunused-variable]
> 174 | struct page *dst_page = sg_page(req->dst);
> |
>
> Reported-by: kernel test robot <lkp@...el.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202403091614.NeUw5zcv-lkp@intel.com/
> Suggested-by: Barry Song <21cnbao@...il.com>
> Signed-off-by: Huacai Chen <chenhuacai@...ngson.cn>
> ---
Thanks, Huacai!
Acked-by: Barry Song <baohua@...nel.org>
+Chris, Max
And I find arch/xtensa/include/asm/cacheflush.h also
needs a similar fix.
> arch/loongarch/include/asm/cacheflush.h | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/arch/loongarch/include/asm/cacheflush.h b/arch/loongarch/include/asm/cacheflush.h
> index 80bd74106985..f8754d08a31a 100644
> --- a/arch/loongarch/include/asm/cacheflush.h
> +++ b/arch/loongarch/include/asm/cacheflush.h
> @@ -37,8 +37,6 @@ void local_flush_icache_range(unsigned long start, unsigned long end);
> #define flush_icache_range local_flush_icache_range
> #define flush_icache_user_range local_flush_icache_range
>
> -#define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 0
> -
> #define flush_cache_all() do { } while (0)
> #define flush_cache_mm(mm) do { } while (0)
> #define flush_cache_dup_mm(mm) do { } while (0)
> @@ -47,7 +45,6 @@ void local_flush_icache_range(unsigned long start, unsigned long end);
> #define flush_cache_vmap(start, end) do { } while (0)
> #define flush_cache_vunmap(start, end) do { } while (0)
> #define flush_icache_user_page(vma, page, addr, len) do { } while (0)
> -#define flush_dcache_page(page) do { } while (0)
> #define flush_dcache_mmap_lock(mapping) do { } while (0)
> #define flush_dcache_mmap_unlock(mapping) do { } while (0)
>
> --
> 2.43.0
>
Powered by blists - more mailing lists