[PATCH 08/17] microblaze: mark flush_dcache_folio() inline

Arnd Bergmann posted 17 patches 2 years, 1 month ago
There is a newer version of this series
[PATCH 08/17] microblaze: mark flush_dcache_folio() inline
Posted by Arnd Bergmann 2 years, 1 month ago
From: Arnd Bergmann <arnd@arndb.de>

The newly added flush_dcache_folio() causes a harmless warning that
turns into a build failure with CONFIG_WERROR:

arch/microblaze/include/asm/cacheflush.h:77:13: error: 'flush_dcache_folio' defined but not used [-Werror=unused-function]

Mark it as inline to avoid this.

Fixes: 1330c94f53996 ("microblaze: implement the new page table range API")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/microblaze/include/asm/cacheflush.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/microblaze/include/asm/cacheflush.h b/arch/microblaze/include/asm/cacheflush.h
index e6641ff98cb30..ffa2cf3893e4b 100644
--- a/arch/microblaze/include/asm/cacheflush.h
+++ b/arch/microblaze/include/asm/cacheflush.h
@@ -74,7 +74,7 @@ do { \
 	flush_dcache_range((unsigned) (addr), (unsigned) (addr) + PAGE_SIZE); \
 } while (0);
 
-static void flush_dcache_folio(struct folio *folio)
+static inline void flush_dcache_folio(struct folio *folio)
 {
 	unsigned long addr = folio_pfn(folio) << PAGE_SHIFT;
 
-- 
2.39.2
Re: [PATCH 08/17] microblaze: mark flush_dcache_folio() inline
Posted by Michal Simek 2 years ago

On 8/10/23 16:19, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The newly added flush_dcache_folio() causes a harmless warning that
> turns into a build failure with CONFIG_WERROR:
> 
> arch/microblaze/include/asm/cacheflush.h:77:13: error: 'flush_dcache_folio' defined but not used [-Werror=unused-function]
> 
> Mark it as inline to avoid this.
> 
> Fixes: 1330c94f53996 ("microblaze: implement the new page table range API")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>   arch/microblaze/include/asm/cacheflush.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/microblaze/include/asm/cacheflush.h b/arch/microblaze/include/asm/cacheflush.h
> index e6641ff98cb30..ffa2cf3893e4b 100644
> --- a/arch/microblaze/include/asm/cacheflush.h
> +++ b/arch/microblaze/include/asm/cacheflush.h
> @@ -74,7 +74,7 @@ do { \
>   	flush_dcache_range((unsigned) (addr), (unsigned) (addr) + PAGE_SIZE); \
>   } while (0);
>   
> -static void flush_dcache_folio(struct folio *folio)
> +static inline void flush_dcache_folio(struct folio *folio)
>   {
>   	unsigned long addr = folio_pfn(folio) << PAGE_SHIFT;
>   

This patch depends on e77d93073327 ("microblaze: implement the new page table
range API")
which has been taken by Andrew via his tree that's why

Acked-by: Michal Simek <michal.simek@amd.com>

If this is not pick up by Andrew I will take it after merge windows is closed.

Thanks,
Michal


-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP/Versal ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal/Versal NET SoCs
TF-A maintainer - Xilinx ZynqMP/Versal/Versal NET SoCs