lkml.org 
[lkml]   [2008]   [Aug]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] cpuset.c : Removes extra variable
Hello everyone, the following patch removes the use of int
cpus_nonempty variable from 'update_flag' function.

Thanks.

Signed-off-by: Md.Rakib H. Mullick (rakib.mullick@gmail.com)

--- linux-2.6.27-rc2.orig/kernel/cpuset.c 2008-08-06 16:23:26.000000000 +0600
+++ linux-2.6.27-rc2/kernel/cpuset.c 2008-08-06 18:03:50.000000000 +0600
@@ -1110,7 +1110,7 @@ static int update_flag(cpuset_flagbits_t
{
struct cpuset trialcs;
int err;
- int cpus_nonempty, balance_flag_changed;
+ int balance_flag_changed;

trialcs = *cs;
if (turning_on)
@@ -1122,7 +1122,6 @@ static int update_flag(cpuset_flagbits_t
if (err < 0)
return err;

- cpus_nonempty = !cpus_empty(trialcs.cpus_allowed);
balance_flag_changed = (is_sched_load_balance(cs) !=
is_sched_load_balance(&trialcs));

@@ -1130,7 +1129,7 @@ static int update_flag(cpuset_flagbits_t
cs->flags = trialcs.flags;
mutex_unlock(&callback_mutex);

- if (cpus_nonempty && balance_flag_changed)
+ if (!cpus_empty(trialcs.cpus_allowed) && balance_flag_changed)
rebuild_sched_domains();

return 0;

\
 
 \ /
  Last update: 2008-08-06 14:55    [W:0.047 / U:0.548 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site