mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sander Vanheule <sander@svanheule.net>
To: Yury Norov <yury.norov@gmail.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: linux-kernel@vger.kernel.org, Sander Vanheule <sander@svanheule.net>
Subject: [PATCH v1 3/3] lib/cpumask: drop always-true preprocessor guard
Date: Tue,  9 Aug 2022 19:36:35 +0200	[thread overview]
Message-ID: <37f6ddf22de46a81b07861682347fa2f25bb0c69.1660066581.git.sander@svanheule.net> (raw)
In-Reply-To: <cover.1660066581.git.sander@svanheule.net>

Since lib/cpumask.o is only built for CONFIG_SMP=y, NR_CPUS will always
be greater than 1 at compile time.  This makes checking for that
condition unnecesarry, so it can be dropped.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
---
 lib/cpumask.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lib/cpumask.c b/lib/cpumask.c
index 8baeb37e23d3..f0ae119be8c4 100644
--- a/lib/cpumask.c
+++ b/lib/cpumask.c
@@ -109,7 +109,6 @@ void __init free_bootmem_cpumask_var(cpumask_var_t mask)
 }
 #endif
 
-#if NR_CPUS > 1
 /**
  * cpumask_local_spread - select the i'th cpu with local numa cpu's first
  * @i: index number
@@ -197,4 +196,3 @@ unsigned int cpumask_any_distribute(const struct cpumask *srcp)
 	return next;
 }
 EXPORT_SYMBOL(cpumask_any_distribute);
-#endif /* NR_CPUS */
-- 
2.37.1


  parent reply	other threads:[~2022-08-09 17:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-09 17:36 [PATCH v1 0/3] cpumask: UP optimisation fixes follow-up Sander Vanheule
2022-08-09 17:36 ` [PATCH v1 1/3] cpumask: align signatures of UP implementations Sander Vanheule
2022-08-09 17:36 ` [PATCH v1 2/3] lib/cpumask: add inline cpumask_next_wrap() for UP Sander Vanheule
2022-08-09 17:36 ` Sander Vanheule [this message]
2022-08-10  4:55 ` [PATCH v1 0/3] cpumask: UP optimisation fixes follow-up Yury Norov
2022-08-10  8:18   ` Sander Vanheule
2022-08-10  8:39     ` Yury Norov
2022-08-10  8:42       ` Sander Vanheule

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=37f6ddf22de46a81b07861682347fa2f25bb0c69.1660066581.git.sander@svanheule.net \
    --to=sander@svanheule.net \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=yury.norov@gmail.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®