From: Alexey Dobriyan Date: Wed, 22 Aug 2018 04:54:41 +0000 (-0700) Subject: proc: use "unsigned int" in /proc/stat hook X-Git-Tag: v4.19-rc1~59^2~118 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9a27e97aaab9a25fac2e8976e98e42ab7f4a8fac;p=thirdparty%2Fkernel%2Flinux.git 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 Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/proc/stat.c b/fs/proc/stat.c index 59749dfaef674..535eda7857cfd 100644 --- a/fs/proc/stat.c +++ b/fs/proc/stat.c @@ -183,7 +183,7 @@ static int show_stat(struct seq_file *p, void *v) static int stat_open(struct inode *inode, struct file *file) { - size_t size = 1024 + 128 * num_online_cpus(); + unsigned int size = 1024 + 128 * num_online_cpus(); /* minimum size to display an interrupt count : 2 bytes */ size += 2 * nr_irqs;