mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] smp: use '|=' for csd_lock
@ 2013-04-22  5:47 liguang
  2013-04-22  5:47 ` [PATCH 2/2] smp: remove 'priv' of call_single_data liguang
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: liguang @ 2013-04-22  5:47 UTC (permalink / raw)
  To: tglx, peterz, akpm, shli, srivatsa.bhat, suresh.b.siddha,
	fweisbec, sedat.dilek, paulmck, linux-kernel
  Cc: liguang

originally, 'data->flags = CSD_FLAG_LOCK',
and we use 'data->flags &= ~CSD_FLAG_LOCK'
for csd_unlock, they are not symmetrix operations
so use '|=' instead of '='.
though, now data->flags only hold CSD_FLAG_LOCK,
it's not so meaningful to use '|=' to set 1 bit,
and '&= ~' to clear 1 bit.

Signed-off-by: liguang <lig.fnst@cn.fujitsu.com>
---
 kernel/smp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/smp.c b/kernel/smp.c
index 1818dc0..2d5deb4 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -109,7 +109,7 @@ static void csd_lock_wait(struct call_single_data *data)
 static void csd_lock(struct call_single_data *data)
 {
 	csd_lock_wait(data);
-	data->flags = CSD_FLAG_LOCK;
+	data->flags |= CSD_FLAG_LOCK;
 
 	/*
 	 * prevent CPU from reordering the above assignment
-- 
1.7.2.5


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-04-24  0:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-22  5:47 [PATCH 1/2] smp: use '|=' for csd_lock liguang
2013-04-22  5:47 ` [PATCH 2/2] smp: remove 'priv' of call_single_data liguang
2013-04-22  6:18 ` [PATCH 1/2] smp: use '|=' for csd_lock Sedat Dilek
2013-04-22  6:22   ` li guang
2013-04-22  6:30     ` Sedat Dilek
2013-04-22  6:49       ` Sedat Dilek
2013-04-23 22:40 ` Andrew Morton
2013-04-24  0:08   ` li guang

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®