mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Colin King <colin.king@canonical.com>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H . Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, xen-devel@lists.xenproject.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/xen: clean up clang build warning
Date: Mon, 18 Sep 2017 10:43:22 +0200	[thread overview]
Message-ID: <681e7853-f71b-e092-e56b-1d0a2c1ddefe@suse.com> (raw)
In-Reply-To: <20170918083817.26870-1-colin.king@canonical.com>

On 18/09/17 10:38, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> In the case where sizeof(maddr) != sizeof(long) p is initialized and
> never read and clang throws a warning on this.  Move declaration of
> p to clean up the clang build warning:
> 
> warning: Value stored to 'p' during its initialization is never read
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

With the code style issue pointed out below fixed:

Reviewed-by: Juergen Gross <jgross@suse.com>

> ---
>  arch/x86/include/asm/xen/hypercall.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/include/asm/xen/hypercall.h b/arch/x86/include/asm/xen/hypercall.h
> index 9606688caa4b..5ff77cb2529e 100644
> --- a/arch/x86/include/asm/xen/hypercall.h
> +++ b/arch/x86/include/asm/xen/hypercall.h
> @@ -552,13 +552,13 @@ static inline void
>  MULTI_update_descriptor(struct multicall_entry *mcl, u64 maddr,
>  			struct desc_struct desc)
>  {
> -	u32 *p = (u32 *) &desc;
> -
>  	mcl->op = __HYPERVISOR_update_descriptor;
>  	if (sizeof(maddr) == sizeof(long)) {
>  		mcl->args[0] = maddr;
>  		mcl->args[1] = *(unsigned long *)&desc;
>  	} else {
> +		u32 *p = (u32 *) &desc;

Please omit the space here      ^


Juergen

> +
>  		mcl->args[0] = maddr;
>  		mcl->args[1] = maddr >> 32;
>  		mcl->args[2] = *p++;
> 

      reply	other threads:[~2017-09-18  8:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-18  8:38 Colin King
2017-09-18  8:43 ` Juergen Gross [this message]

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=681e7853-f71b-e092-e56b-1d0a2c1ddefe@suse.com \
    --to=jgross@suse.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=colin.king@canonical.com \
    --cc=hpa@zytor.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=xen-devel@lists.xenproject.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

Powered by JetHome