public inbox for linux-rt-users@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Daniel Wagner <daniel.wagner@bmw-carit.de>
Cc: linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org,
	Boqun Feng <boqun.feng@gmail.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Paul Gortmaker <paul.gortmaker@windriver.com>,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>
Subject: Re: [PATCH tip v4 2/5] [s]wait: Add compile time type check assertion
Date: Fri, 27 Nov 2015 21:10:00 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.11.1511272108570.3572@nanos> (raw)
In-Reply-To: <5656F98D.70701@bmw-carit.de>

On Thu, 26 Nov 2015, Daniel Wagner wrote:
> On 11/24/2015 02:03 PM, Daniel Wagner wrote:
> > The API provided by wait.h and swait.h is very similiar. Most of the
> > time your are only one character away from either of it:
> > 
> >      wake_up() vs swake_up()
> > 
> > This is on purpose so that we do not have two nearly identical bits of
> > infrastructre code with dissimilar names.
> > 
> > A compile time type check assertion ensures that obvious wrong usage
> > is caught at early stage.
> 
> Obviously, this didn't really work as one can see with patch #4. That
> one just compiled. So I wrapped almost all functions to get a better
> check coverage. woken_wake_function(), autoremove_wake_function() and
> wake_bit_function() can't be wrapped easily because DEFINE_WAIT and 
> friends. I just left them out. 
> 
> The result looks pretty bad in my opinion. Probably it would be
> better do add -Werror=incompatible-pointer-types to the CFLAGS.

That's really bad.

If we can pull off the -Werror=incompatible-pointer-types trick, that
would solve it nicely.
 
Thanks,

	tglx

  reply	other threads:[~2015-11-27 20:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-24 13:03 [PATCH tip v4 0/5] Simple wait queue support Daniel Wagner
2015-11-24 13:03 ` [PATCH tip v4 1/5] wait.[ch]: Introduce the simple waitqueue (swait) implementation Daniel Wagner
2015-11-24 13:03 ` [PATCH tip v4 2/5] [s]wait: Add compile time type check assertion Daniel Wagner
2015-11-26 12:22   ` Daniel Wagner
2015-11-27 20:10     ` Thomas Gleixner [this message]
2015-11-24 13:03 ` [PATCH tip v4 3/5] KVM: use simple waitqueue for vcpu->wq Daniel Wagner
2015-11-24 13:03 ` [PATCH tip v4 4/5] rcu: Do not call rcu_nocb_gp_cleanup() while holding rnp->lock Daniel Wagner
2015-11-24 15:52   ` Boqun Feng
2015-11-25  1:01     ` Boqun Feng
2015-11-25 10:29       ` Daniel Wagner
2015-11-24 13:03 ` [PATCH tip v4 5/5] rcu: use simple wait queues where possible in rcutree Daniel Wagner

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=alpine.DEB.2.11.1511272108570.3572@nanos \
    --to=tglx@linutronix.de \
    --cc=boqun.feng@gmail.com \
    --cc=daniel.wagner@bmw-carit.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=paul.gortmaker@windriver.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=peterz@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