All of lore.kernel.org
 help / color / mirror / Atom feed
From: Waiman Long <waiman.long@hp.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Peter Anvin <hpa@zytor.com>, Brian Gerst <brgerst@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Borislav Petkov <bp@alien8.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Andy Lutomirski <luto@amacapital.net>,
	Louis Langholtz <lou_langholtz@me.com>,
	Denys Vlasenko <dvlasenk@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [tip:x86/build] x86/build: Remove -Wno-sign-compare
Date: Tue, 12 May 2015 13:51:42 -0400	[thread overview]
Message-ID: <55523DAE.2080605@hp.com> (raw)
In-Reply-To: <20150512085303.GA9090@gmail.com>

On 05/12/2015 04:53 AM, Ingo Molnar wrote:
> * Ingo Molnar<mingo@kernel.org>  wrote:
>
>> Here's the full list of warnings for allmod64:
>>
>> make bzImage:
>>
>>   include/linux/blkdev.h:624:26: warning: switch condition has boolean value [-Wswitch-bool]
>>   ./arch/x86/include/asm/qspinlock.h:28:2: warning: implicit declaration of function ?pv_queued_spin_lock_slowpath? [-Wimplicit-function-declaration]
>>   ./arch/x86/include/asm/qspinlock.h:33:2: warning: implicit declaration of function ?pv_queued_spin_unlock? [-Wimplicit-function-declaration]
>>   ./arch/x86/include/asm/qspinlock.h:28:2: warning: implicit declaration of function ?pv_queued_spin_lock_slowpath? [-Wimplicit-function-declaration]
>>   ./arch/x86/include/asm/qspinlock.h:33:2: warning: implicit declaration of function ?pv_queued_spin_unlock? [-Wimplicit-function-declaration]
>>   ./arch/x86/include/asm/qspinlock.h:28:2: warning: implicit declaration of function ?pv_queued_spin_lock_slowpath? [-Wimplicit-function-declaration]
>>   ./arch/x86/include/asm/qspinlock.h:33:2: warning: implicit declaration of function ?pv_queued_spin_unlock? [-Wimplicit-function-declaration]
>>   ./arch/x86/include/asm/qspinlock.h:28:2: warning: implicit declaration of function ?pv_queued_spin_lock_slowpath? [-Wimplicit-function-declaration]
>>   ./arch/x86/include/asm/qspinlock.h:33:2: warning: implicit declaration of function ?pv_queued_spin_unlock? [-Wimplicit-function-declaration]
> And that comes from tip:locking/core, but those warnings do not show
> up with GCC 4.9.2: so it's either a GCC 5.0.1 bug, or we missed
> something with the WIP queued pv spinlocks changes that newer GCC is
> able to notice.
>
> Thanks,
>
> 	Ingo

The only way this can happen is when __ASSEMBLY__ is defined and 
asm/qspinlock.h is included. Could you apply the following patch to see 
if it can fix the compilation warnings? I don't have a gcc 5 compiler on 
hand to verify that.

Cheers,
Longman


---
  arch/x86/include/asm/qspinlock.h |    5 ++++-
  1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/arch/x86/include/asm/qspinlock.h 
b/arch/x86/include/asm/qspinlock.h
index 9d51fae..3ea1c57 100644
--- a/arch/x86/include/asm/qspinlock.h
+++ b/arch/x86/include/asm/qspinlock.h
@@ -17,7 +17,10 @@ static inline void native_queued_spin_unlock(struct 
qspinlock *lock)
      smp_store_release((u8 *)lock, 0);
  }

-#ifdef CONFIG_PARAVIRT_SPINLOCKS
+/*
+ * Disable the PV code for assembly to prevent compilation warnings.
+ */
+#if defined(CONFIG_PARAVIRT_SPINLOCKS) && !defined(__ASSEMBLY__)
  extern void native_queued_spin_lock_slowpath(struct qspinlock *lock, 
u32 val);
  extern void __pv_init_lock_hash(void);
  extern void __pv_queued_spin_lock_slowpath(struct qspinlock *lock, u32 
val);
-- 



  reply	other threads:[~2015-05-12 17:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <tip-fd096a3bcd9718d979a7dd6253cd5b46fff66593@git.kernel.org>
     [not found] ` <CA+55aFxa5HHKJNdZrSg2XNY-im1-WyG=uLveqmZKYo_Zd=kosA@mail.gmail.com>
2015-05-12  8:44   ` [tip:x86/build] x86/build: Remove -Wno-sign-compare Ingo Molnar
2015-05-12  8:53     ` Ingo Molnar
2015-05-12 17:51       ` Waiman Long [this message]
2015-05-13  7:43     ` Valdis.Kletnieks
2015-05-13 10:22       ` Ingo Molnar
2015-05-13 17:33         ` Louis Langholtz
2015-05-13 17:50           ` Linus Torvalds

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=55523DAE.2080605@hp.com \
    --to=waiman.long@hp.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=bp@alien8.de \
    --cc=brgerst@gmail.com \
    --cc=dvlasenk@redhat.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lou_langholtz@me.com \
    --cc=luto@amacapital.net \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.