mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Barry Song <21cnbao@gmail.com>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	chris@zankel.net, jcmvbkbc@gmail.com, willy@infradead.org,
	alexghiti@rivosinc.com, rppt@kernel.org, dennis@kernel.org,
	Barry Song <v-songbaohua@oppo.com>,
	Huacai Chen <chenhuacai@loongson.cn>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] xtensa: remove redundant flush_dcache_page and ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE macros
Date: Sun, 17 Mar 2024 17:16:05 -0700	[thread overview]
Message-ID: <369716bf-0216-4114-b502-a2d2c819ee8c@roeck-us.net> (raw)
In-Reply-To: <20240313045036.51065-1-21cnbao@gmail.com>

On Wed, Mar 13, 2024 at 05:50:36PM +1300, Barry Song wrote:
> From: Barry Song <v-songbaohua@oppo.com>
> 
> xtensa's flush_dcache_page() can be a no-op sometimes. There is a
> generic implementation for this case in include/asm-generic/
> cacheflush.h.
>  #ifndef ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE
>  static inline void flush_dcache_page(struct page *page)
>  {
>  }
> 
>  #define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 0
>  #endif
> 
> So remove the superfluous flush_dcache_page() definition, which also
> helps silence potential build warnings complaining the page variable
> passed to flush_dcache_page() is not used.
> 
>    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);
>          |
> 
> The issue was originally reported on LoongArch by kernel test
> robot. And Huacai fixed it on LoongArch, but I found xtensa
> obviously has the same issue.
> 

Maybe I am doing something wrong, but this patch doesn't build
for me.

 CC      arch/xtensa/kernel/asm-offsets.s
In file included from ./include/linux/highmem.h:8,
                 from ./include/linux/bvec.h:10,
                 from ./include/linux/blk_types.h:10,
                 from ./include/linux/writeback.h:13,
                 from ./include/linux/memcontrol.h:23,
                 from ./include/linux/swap.h:9,
                 from ./include/linux/suspend.h:5,
                 from arch/xtensa/kernel/asm-offsets.c:24:
./include/linux/cacheflush.h:9:5: error: "ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE" is not defined, evaluates to 0 [-Werror=undef]
    9 | #if ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE

Guenter

  reply	other threads:[~2024-03-18  0:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-13  4:50 Barry Song
2024-03-18  0:16 ` Guenter Roeck [this message]
2024-03-18  0:27   ` Barry Song
2024-03-18  0:34     ` Guenter Roeck
2024-03-18  0:37       ` Barry Song

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=369716bf-0216-4114-b502-a2d2c819ee8c@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=21cnbao@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=alexghiti@rivosinc.com \
    --cc=chenhuacai@loongson.cn \
    --cc=chris@zankel.net \
    --cc=dennis@kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=jcmvbkbc@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=rppt@kernel.org \
    --cc=v-songbaohua@oppo.com \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®