Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

proc: use "unsigned int" in /proc/stat hook

Number of CPUs is never high enough to force 64-bit arithmetic.
Save couple of bytes on x86_64.

Link: http://lkml.kernel.org/r/20180627200710.GC18434@avx2
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Alexey Dobriyan and committed by
Linus Torvalds
9a27e97a 891ae71d

+1 -1
+1 -1
fs/proc/stat.c
··· 183 183 184 184 static int stat_open(struct inode *inode, struct file *file) 185 185 { 186 - size_t size = 1024 + 128 * num_online_cpus(); 186 + unsigned int size = 1024 + 128 * num_online_cpus(); 187 187 188 188 /* minimum size to display an interrupt count : 2 bytes */ 189 189 size += 2 * nr_irqs;