summaryrefslogtreecommitdiff
path: root/include/linux/cpumask.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-09-26 11:38:21 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-09-26 11:38:21 +0300
commit67102bd31b4e31abb0abbc390381212a2d65db72 (patch)
tree904754c940eb87b951cf877f09074a7d28bc2947 /include/linux/cpumask.h
parentad5dbfc123e6ffbbde194e2a4603323e09f741ee (diff)
parentf76349cf41451c5c42a99f18a9163377e4b364ff (diff)
downloadlinux-67102bd31b4e31abb0abbc390381212a2d65db72.tar.xz
Merge 6.0-rc7 into usb-next
We need the USB fixes in here for other follow-on changes to be able to be applied successfully. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/cpumask.h')
-rw-r--r--include/linux/cpumask.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h
index bd047864c7ac..e8ad12b5b9d2 100644
--- a/include/linux/cpumask.h
+++ b/include/linux/cpumask.h
@@ -1127,9 +1127,10 @@ cpumap_print_list_to_buf(char *buf, const struct cpumask *mask,
* cover a worst-case of every other cpu being on one of two nodes for a
* very large NR_CPUS.
*
- * Use PAGE_SIZE as a minimum for smaller configurations.
+ * Use PAGE_SIZE as a minimum for smaller configurations while avoiding
+ * unsigned comparison to -1.
*/
-#define CPUMAP_FILE_MAX_BYTES ((((NR_CPUS * 9)/32 - 1) > PAGE_SIZE) \
+#define CPUMAP_FILE_MAX_BYTES (((NR_CPUS * 9)/32 > PAGE_SIZE) \
? (NR_CPUS * 9)/32 - 1 : PAGE_SIZE)
#define CPULIST_FILE_MAX_BYTES (((NR_CPUS * 7)/2 > PAGE_SIZE) ? (NR_CPUS * 7)/2 : PAGE_SIZE)