public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Qian Cai <cai@lca.pw>
To: mpe@ellerman.id.au
Cc: benh@kernel.crashing.org, paulus@samba.org,
	akpm@linux-foundation.org, linuxppc-dev@lists.ozlabs.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] powerpc/cacheflush: fix variable set but not used
Date: Thu, 27 Jun 2019 15:54:08 -0400	[thread overview]
Message-ID: <1561665248.5154.91.camel@lca.pw> (raw)
In-Reply-To: <1559829493-28457-1-git-send-email-cai@lca.pw>

Ping.

On Thu, 2019-06-06 at 09:58 -0400, Qian Cai wrote:
> The powerpc's flush_cache_vmap() is defined as a macro and never use
> both of its arguments, so it will generate a compilation warning,
> 
> lib/ioremap.c: In function 'ioremap_page_range':
> lib/ioremap.c:203:16: warning: variable 'start' set but not used
> [-Wunused-but-set-variable]
> 
> Fix it by making it an inline function.
> 
> Signed-off-by: Qian Cai <cai@lca.pw>
> ---
>  arch/powerpc/include/asm/cacheflush.h | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/powerpc/include/asm/cacheflush.h
> b/arch/powerpc/include/asm/cacheflush.h
> index 74d60cfe8ce5..fd318f7c3eed 100644
> --- a/arch/powerpc/include/asm/cacheflush.h
> +++ b/arch/powerpc/include/asm/cacheflush.h
> @@ -29,9 +29,12 @@
>   * not expect this type of fault. flush_cache_vmap is not exactly the right
>   * place to put this, but it seems to work well enough.
>   */
> -#define flush_cache_vmap(start, end)		do { asm
> volatile("ptesync" ::: "memory"); } while (0)
> +static inline void flush_cache_vmap(unsigned long start, unsigned long end)
> +{
> +	asm volatile("ptesync" ::: "memory");
> +}
>  #else
> -#define flush_cache_vmap(start, end)		do { } while (0)
> +static inline void flush_cache_vmap(unsigned long start, unsigned long end) {
> }
>  #endif
>  
>  #define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 1

  reply	other threads:[~2019-06-27 19:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-06 13:58 [PATCH] powerpc/cacheflush: fix variable set but not used Qian Cai
2019-06-27 19:54 ` Qian Cai [this message]
2019-07-03 14:27 ` Michael Ellerman

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=1561665248.5154.91.camel@lca.pw \
    --to=cai@lca.pw \
    --cc=akpm@linux-foundation.org \
    --cc=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.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