mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rakib Mullick" <rakib.mullick@gmail.com>
To: pj@sgi.com, menage@google.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] cpuset.c : Removes extra variable
Date: Wed, 6 Aug 2008 18:50:37 +0600	[thread overview]
Message-ID: <b9df5fa10808060550y483d1c1dh99bac10c158510df@mail.gmail.com> (raw)

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;

             reply	other threads:[~2008-08-06 12:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-06 12:50 Rakib Mullick [this message]
2008-08-06 20:22 ` Paul Jackson
2008-08-07  5:02 ` Paul Jackson

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=b9df5fa10808060550y483d1c1dh99bac10c158510df@mail.gmail.com \
    --to=rakib.mullick@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=menage@google.com \
    --cc=pj@sgi.com \
    /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®