From: Oleg Nesterov <oleg@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>,
Samuel Ortiz <samuel@sortiz.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
Dave Jones <davej@redhat.com>,
David Howells <dhowells@redhat.com>,
Imre Deak <imre.deak@intel.com>, Jens Axboe <axboe@kernel.dk>,
Linus Torvalds <torvalds@linux-foundation.org>,
Lukas Czerner <lczerner@redhat.com>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Tejun Heo <tj@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] wait: introduce wait_event_common(wq, condition, state, timeout)
Date: Wed, 19 Jun 2013 18:14:56 +0200 [thread overview]
Message-ID: <20130619161456.GC9176@redhat.com> (raw)
In-Reply-To: <20130618150656.3266771d49f68f86fdb5e3f3@linux-foundation.org>
On 06/18, Andrew Morton wrote:
>
> On Thu, 6 Jun 2013 22:03:16 +0200 Oleg Nesterov <oleg@redhat.com> wrote:
> > -#define __wait_event_interruptible(wq, condition, ret)
> > +#define __wait_event_interruptible(wq, condition)
>
> net/irda/af_irda.c:2568:13: error: macro "__wait_event_interruptible" passed 3 arguments, but takes just 2
Aaah. Thanks.
> waddup with that?
Will read "man grep" again.
> __wait_event_interruptible() has several callsites. I think I'll go
> zap and await v2 ;)
Yes, will do, thanks.
And note that one of the reasons for this patch was to make
wait_event_interruptible() and __wait_event_interruptible()
interchangeable, like wait_event() and __wait_event().
irda_getsockopt() uses __wait* exactly because it has already
checked the condition.
Samuel, will you agree with the patch below?
Yes, this adds the unnecessary check. We will remove it later,
after we change wait_event* macros, just
- err = wait_event_interruptible(...);
+ err = __wait_event_interruptible(...);
Otherwise, this patch should also change af_irda.c (and probably
other callers), not good.
Oleg.
--- x/net/irda/af_irda.c
+++ x/net/irda/af_irda.c
@@ -2563,9 +2563,8 @@ bed:
jiffies + msecs_to_jiffies(val));
/* Wait for IR-LMP to call us back */
- __wait_event_interruptible(self->query_wait,
- (self->cachedaddr != 0 || self->errno == -ETIME),
- err);
+ err = wait_event_interruptible(self->query_wait,
+ (self->cachedaddr != 0 || self->errno == -ETIME));
/* If watchdog is still activated, kill it! */
del_timer(&(self->watchdog));
next prev parent reply other threads:[~2013-06-19 16:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-06 20:02 [PATCH 0/2] introduce wait_event_common() Oleg Nesterov
2013-06-06 20:03 ` [PATCH 1/2] wait: introduce wait_event_common(wq, condition, state, timeout) Oleg Nesterov
2013-06-18 22:06 ` Andrew Morton
2013-06-19 16:14 ` Oleg Nesterov [this message]
2013-06-06 20:03 ` [PATCH 2/2] wait: introduce prepare_to_wait_event() Oleg Nesterov
2013-06-06 21:36 ` Tejun Heo
2013-06-07 13:07 ` Oleg Nesterov
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=20130619161456.GC9176@redhat.com \
--to=oleg@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=daniel.vetter@ffwll.ch \
--cc=davej@redhat.com \
--cc=dhowells@redhat.com \
--cc=imre.deak@intel.com \
--cc=lczerner@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=samuel@sortiz.org \
--cc=tj@kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox