cpumask_scnprintf_len() takes "len" as an argument which is surprising,
If one follows call chain down it isn't length but number of bits. But
there is natural number of bits when talking about CPU masks -- NR_CPUS.
So use that.
Remove 1:1 wrapper macro while I'm at it.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---
include/linux/cpumask.h | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
--- a/include/linux/cpumask.h
+++ b/include/linux/cpumask.h
@@ -289,11 +289,9 @@ static inline int __cpumask_scnprintf(char *buf, int len,
return bitmap_scnprintf(buf, len, srcp->bits, nbits);
}
-#define cpumask_scnprintf_len(len) \
- __cpumask_scnprintf_len((len))
-static inline int __cpumask_scnprintf_len(int len)
+static inline int cpumask_scnprintf_len(void)
{
- return bitmap_scnprintf_len(len);
+ return bitmap_scnprintf_len(NR_CPUS);
}
#define cpumask_parse_user(ubuf, ulen, dst) \
--
| Andrea Arcangeli | [PATCH 06 of 11] rwsem contended |
| Mikulas Patocka | LFENCE instruction (was: [rfc][patch 3/3] x86: optimise barriers) |
| Rafael J. Wysocki | Re: [Bug 10030] Suspend doesn't work when SD card is inserted |
| Manu Abraham | PCIE |
git: | |
| Sverre Rabbelier | Git vs Monotone |
| Junio C Hamano | [ANNOUNCE] GIT 1.5.4 |
| Bill Lear | Meaning of "fatal: protocol error: bad line length character"? |
| Junio C Hamano | Re: [PATCH] Teach remote machinery about remotes.default config variable |
| Richard Stallman | Real men don't attack straw men |
| Stefan Beke | mail dovecot: pipe() failed: Too many open files |
| Wijnand Wiersma | Almost success: OpenBSD on Xen |
| Didier Wiroth | how can I "find xyz | xargs tar" ... like gtar |
| Greg A. Woods | Re: Fork bomb protection patch |
| Tyler Retzlaff | Re: more summer of code fun |
| Elad Efrat | Re: sysctl knob to let sugid processes dump core (pr 15994) |
| Thor Lancelot Simon | Re: FFS journal |
