From: Steven Rostedt Date: Thu, 4 Dec 2008 05:26:39 +0000 (-0500) Subject: pid: fix the do_each_pid_task() macro X-Git-Tag: upstream/snapshot3+hdmi~18679^2~434 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5ef6476190d24419a9a537baa0b5641845136989;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git pid: fix the do_each_pid_task() macro Impact: macro side-effects fix This patch adds parenthesis around 'pid' in the do_each_pid_task macro to allow callers to pass in more complex parameters. e.g. do_each_pid_task(*pid, type, task) Signed-off-by: Steven Rostedt Signed-off-by: Ingo Molnar --- diff --git a/include/linux/pid.h b/include/linux/pid.h index d7e98ff..bb206c5 100644 --- a/include/linux/pid.h +++ b/include/linux/pid.h @@ -147,9 +147,9 @@ pid_t pid_vnr(struct pid *pid); #define do_each_pid_task(pid, type, task) \ do { \ struct hlist_node *pos___; \ - if (pid != NULL) \ + if ((pid) != NULL) \ hlist_for_each_entry_rcu((task), pos___, \ - &pid->tasks[type], pids[type].node) { + &(pid)->tasks[type], pids[type].node) { /* * Both old and new leaders may be attached to