From: vlobanov <vlobanov@speakeasy.net>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] fix init_wait macro
Date: Wed, 15 Dec 2004 23:50:10 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.58.0412152340500.17260@shell3.speakeasy.net> (raw)
Hello,
In looking through bugzilla.kernel.org, I found a rather old and easy
bug still laying around unfixed:
bug #3863 (http://bugzilla.kernel.org/show_bug.cgi?id=3863)
The patch is straightforward -- wrap the macro argument in parentheses,
to prevent incorrect operator binding. Applies against 2.6.10-rc3.
======================================================
diff -Nru a/include/linux/wait.h b/include/linux/wait.h
--- a/include/linux/wait.h 2004-12-04 23:00:18.000000000 -0800
+++ b/include/linux/wait.h 2004-12-15 22:51:58.000000000 -0800
@@ -344,9 +344,9 @@
#define init_wait(wait) \
do { \
- wait->task = current; \
- wait->func = autoremove_wake_function; \
- INIT_LIST_HEAD(&wait->task_list); \
+ (wait)->task = current; \
+ (wait)->func = autoremove_wake_function; \
+ INIT_LIST_HEAD(&(wait)->task_list); \
} while (0)
/**
======================================================
Let me know if there are any objections to this patch, though I do not
foresee any. Since this is a general patch, I should forward it to Linux
or Rusty, though not sure who would be best in this case.
Signed-off-by: Vadim Lobanov <vlobanov@speakeasy.net>
reply other threads:[~2004-12-16 7:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=Pine.LNX.4.58.0412152340500.17260@shell3.speakeasy.net \
--to=vlobanov@speakeasy.net \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®