Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Arnd Bergmann <arnd@arndb.de>, Andrew Morton <akpm@linux-foundation.org>
Cc: Ralf Baechle <ralf@linux-mips.org>,
	James Hogan <james.hogan@imgtec.com>,
	Paul Burton <paul.burton@imgtec.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Juergen Gross <jgross@suse.com>, Ingo Molnar <mingo@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-mips@linux-mips.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] smp_call_function: use inline helpers instead of macros
Date: Wed, 26 Jul 2017 16:42:07 +0200	[thread overview]
Message-ID: <cc227181-ef9f-dede-d478-ba0714e4bfbb@redhat.com> (raw)
In-Reply-To: <20170726133447.2056379-1-arnd@arndb.de>

On 26/07/2017 15:32, Arnd Bergmann wrote:
> A new caller of smp_call_function() passes a local variable as the 'wait'
> argument, and that variable is otherwise unused, so we get a warning
> in non-SMP configurations:
> 
> virt/kvm/kvm_main.c: In function 'kvm_make_all_cpus_request':
> virt/kvm/kvm_main.c:195:7: error: unused variable 'wait' [-Werror=unused-variable]
>   bool wait = req & KVM_REQUEST_WAIT;
> 
> This addresses the warning by changing the two macros into inline functions.
> As reported by the 0day build bot, a small change is required in the MIPS
> r4k code for this, which then gets a warning about a missing variable.
> 
> Fixes: 7a97cec26b94 ("KVM: mark requests that need synchronization")
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Link: https://patchwork.kernel.org/patch/9722063/
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

This is not needed anymore, I've fixed it in KVM:

    commit b49defe83659cefbb1763d541e779da32594ab10
    Author: Paolo Bonzini <pbonzini@redhat.com>
    Date:   Fri Jun 30 13:25:45 2017 +0200

    kvm: avoid unused variable warning for UP builds

    The uniprocessor version of smp_call_function_many does not evaluate
    all of its argument, and the compiler emits a warning about "wait"
    being unused.  This breaks the build on architectures for which
    "-Werror" is enabled by default.

    Work around it by moving the invocation of smp_call_function_many to
    its own inline function.

    Reported-by: Paul Mackerras <paulus@ozlabs.org>
    Cc: stable@vger.kernel.org
    Fixes: 7a97cec26b94c909f4cbad2dc3186af3e457a522
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Paolo

  reply	other threads:[~2017-07-26 14:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-26 13:32 [PATCH v2] smp_call_function: use inline helpers instead of macros Arnd Bergmann
2017-07-26 14:42 ` Paolo Bonzini [this message]
2017-07-26 14:50   ` Arnd Bergmann

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=cc227181-ef9f-dede-d478-ba0714e4bfbb@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=james.hogan@imgtec.com \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=mingo@kernel.org \
    --cc=paul.burton@imgtec.com \
    --cc=peterz@infradead.org \
    --cc=ralf@linux-mips.org \
    --cc=tglx@linutronix.de \
    /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