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>, Max Filippov <jcmvbkbc@gmail.com>
Cc: chris@zankel.net, akpm@linux-foundation.org,
	linux-kernel@vger.kernel.org, willy@infradead.org,
	dennis@kernel.org, alexghiti@rivosinc.com,
	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 v2] xtensa: remove redundant flush_dcache_page and ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE macros
Date: Mon, 18 Mar 2024 20:49:00 -0700	[thread overview]
Message-ID: <abf2b1db-3e13-4765-9034-712430e856d7@roeck-us.net> (raw)
In-Reply-To: <CAGsJ_4z8yDrrcBSByXSq79PCnCGQRaH_DXg2K2aqCApsseLDFA@mail.gmail.com>

On 3/18/24 19:16, Barry Song wrote:
> On Tue, Mar 19, 2024 at 3:12 PM Max Filippov <jcmvbkbc@gmail.com> wrote:
>>
>> On Mon, Mar 18, 2024 at 6:27 PM Barry Song <21cnbao@gmail.com> wrote:
>>> On Tue, Mar 19, 2024 at 2:09 PM Barry Song <21cnbao@gmail.com> 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 (Huacai fixed it on LoongArch), then reported by Guenter
>>>> and me on xtensa.
>>
>> I wonder why this warning is considered useful in the first place?
> 
> Guenter reported it as an error not a warning
> "
> 
> Error log:
> crypto/scompress.c: In function 'scomp_acomp_comp_decomp':
> crypto/scompress.c:174:38: error: unused variable 'dst_page'"
> 
> is it because xtensa's toolchain is different with others?
>

It is because -Werror is now default in allmodconfig builds.
Other test build systems may manually override that.

Guenter


  reply	other threads:[~2024-03-19  3:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-19  1:09 Barry Song
2024-03-19  1:27 ` Barry Song
2024-03-19  2:12   ` Max Filippov
2024-03-19  2:16     ` Barry Song
2024-03-19  3:49       ` Guenter Roeck [this message]
2024-03-19 14:17   ` Guenter Roeck
2024-03-19 23:22     ` Barry Song
2024-03-19  3:43 ` Guenter Roeck
2024-04-27 19:05 ` Guenter Roeck
2024-04-29  1:39   ` Barry Song
2024-04-29  5:09   ` Max Filippov
2024-04-29  9:11     ` Barry Song
2024-04-29 13:58     ` Guenter Roeck

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=abf2b1db-3e13-4765-9034-712430e856d7@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=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®