From: Christoph Lameter Date: Thu, 10 Jan 2013 19:14:17 +0000 (+0000) Subject: stat: Use size_t for sizes instead of unsigned X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9e5e8deca74603357626471a9b44f05dea9e32b1;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git stat: Use size_t for sizes instead of unsigned On some platforms (such as IA64) the large page size may results in slab allocations to be allowed of numbers that do not fit in 32 bit. Acked-by: Glauber Costa Signed-off-by: Christoph Lameter Signed-off-by: Pekka Enberg --- diff --git a/fs/proc/stat.c b/fs/proc/stat.c index e296572c73ed..1cf86c0e8689 100644 --- a/fs/proc/stat.c +++ b/fs/proc/stat.c @@ -184,7 +184,7 @@ static int show_stat(struct seq_file *p, void *v) static int stat_open(struct inode *inode, struct file *file) { - unsigned size = 1024 + 128 * num_possible_cpus(); + size_t size = 1024 + 128 * num_possible_cpus(); char *buf; struct seq_file *m; int res;