[PATCH] smp: Remove CSD_FLAG_WAIT flag that's unused

From: Tim Chen
Date: Fri Feb 27 2015 - 15:36:46 EST



The CSD_FLAG_WAIT is not serving any useful purpose as we do not use
its value to decide if we are going to wait for a smp call to complete.
We also never cleared it properly when we are done waiting to indicate
that the wait is over. So the WARNING debug check in csd_unlock is
also not serving useful purpose. Propose here to remove it to clean up
the code.

Thanks.

Tim

Signed-off-by: Tim Chen <tim.c.chen@xxxxxxxxxxxxxxx>
---
kernel/smp.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/kernel/smp.c b/kernel/smp.c
index f38a1e6..b65420d 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -19,7 +19,6 @@

enum {
CSD_FLAG_LOCK = 0x01,
- CSD_FLAG_WAIT = 0x02,
};

struct call_function_data {
@@ -126,7 +125,7 @@ static void csd_lock(struct call_single_data *csd)

static void csd_unlock(struct call_single_data *csd)
{
- WARN_ON((csd->flags & CSD_FLAG_WAIT) && !(csd->flags & CSD_FLAG_LOCK));
+ WARN_ON(!(csd->flags & CSD_FLAG_LOCK));

/*
* ensure we're all done before releasing data:
@@ -173,9 +172,6 @@ static int generic_exec_single(int cpu, struct call_single_data *csd,
csd->func = func;
csd->info = info;

- if (wait)
- csd->flags |= CSD_FLAG_WAIT;
-
/*
* The list addition should be visible before sending the IPI
* handler locks the list to pull the entry off it because of
--
1.9.3


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/