Re: [PATCH] vt: don't use kmalloc() for the unicode screen buffer
From: kbuild test robot
Date: Sat Mar 28 2020 - 20:13:23 EST
Hi Nicolas,
I love your patch! Yet something to improve:
[auto build test ERROR on tty/tty-testing]
[also build test ERROR on v5.6-rc7 next-20200327]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Nicolas-Pitre/vt-don-t-use-kmalloc-for-the-unicode-screen-buffer/20200329-060123
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing
config: mips-nlm_xlp_defconfig (attached as .config)
compiler: mips64-linux-gcc (GCC) 9.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=9.2.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>
All error/warnings (new ones prefixed by >>):
drivers/tty/vt/vt.c: In function 'vc_uniscr_alloc':
>> drivers/tty/vt/vt.c:353:6: error: implicit declaration of function 'vmalloc'; did you mean 'kvmalloc'? [-Werror=implicit-function-declaration]
353 | p = vmalloc(memsize);
| ^~~~~~~
| kvmalloc
>> drivers/tty/vt/vt.c:353:4: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
353 | p = vmalloc(memsize);
| ^
drivers/tty/vt/vt.c: In function 'vc_uniscr_set':
>> drivers/tty/vt/vt.c:369:2: error: implicit declaration of function 'vfree'; did you mean 'kvfree'? [-Werror=implicit-function-declaration]
369 | vfree(vc->vc_uni_screen);
| ^~~~~
| kvfree
cc1: some warnings being treated as errors
vim +353 drivers/tty/vt/vt.c
343
344 static struct uni_screen *vc_uniscr_alloc(unsigned int cols, unsigned int rows)
345 {
346 struct uni_screen *uniscr;
347 void *p;
348 unsigned int memsize, i;
349
350 /* allocate everything in one go */
351 memsize = cols * rows * sizeof(char32_t);
352 memsize += rows * sizeof(char32_t *);
> 353 p = vmalloc(memsize);
354 if (!p)
355 return NULL;
356
357 /* initial line pointers */
358 uniscr = p;
359 p = uniscr->lines + rows;
360 for (i = 0; i < rows; i++) {
361 uniscr->lines[i] = p;
362 p += cols * sizeof(char32_t);
363 }
364 return uniscr;
365 }
366
367 static void vc_uniscr_set(struct vc_data *vc, struct uni_screen *new_uniscr)
368 {
> 369 vfree(vc->vc_uni_screen);
370 vc->vc_uni_screen = new_uniscr;
371 }
372
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip