Re: [PATCH] drivers: tty: replace snprintf in show functions with sysfs_emit
From: kernel test robot
Date: Thu Oct 28 2021 - 17:24:22 EST
Hi,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on tty/tty-testing]
[also build test WARNING on staging/staging-testing v5.15-rc7 next-20211028]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/cgel-zte-gmail-com/drivers-tty-replace-snprintf-in-show-functions-with-sysfs_emit/20211028-181624
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing
config: ia64-defconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/03b103ac2507a7958ac9e45fe6a53110e1140625
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review cgel-zte-gmail-com/drivers-tty-replace-snprintf-in-show-functions-with-sysfs_emit/20211028-181624
git checkout 03b103ac2507a7958ac9e45fe6a53110e1140625
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=ia64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All warnings (new ones prefixed by >>):
In file included from arch/ia64/include/asm/ptrace.h:46,
from arch/ia64/include/asm/processor.h:20,
from arch/ia64/include/asm/timex.h:15,
from include/linux/timex.h:65,
from include/linux/time32.h:13,
from include/linux/time.h:60,
from include/linux/stat.h:19,
from include/linux/module.h:13,
from drivers/tty/serial/8250/8250_port.c:14:
drivers/tty/serial/8250/8250_port.c: In function 'rx_trig_bytes_show':
>> arch/ia64/include/asm/page.h:42:33: warning: passing argument 2 of 'sysfs_emit' makes pointer from integer without a cast [-Wint-conversion]
42 | #define PAGE_SIZE (__IA64_UL_CONST(1) << PAGE_SHIFT)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| long unsigned int
drivers/tty/serial/8250/8250_port.c:3102:32: note: in expansion of macro 'PAGE_SIZE'
3102 | return sysfs_emit(buf, PAGE_SIZE, "%d\n", rxtrig_bytes);
| ^~~~~~~~~
In file included from include/linux/kobject.h:20,
from include/linux/module.h:21,
from drivers/tty/serial/8250/8250_port.c:14:
include/linux/sysfs.h:341:39: note: expected 'const char *' but argument is of type 'long unsigned int'
341 | int sysfs_emit(char *buf, const char *fmt, ...);
| ~~~~~~~~~~~~^~~
vim +/sysfs_emit +42 arch/ia64/include/asm/page.h
^1da177e4c3f415 include/asm-ia64/page.h Linus Torvalds 2005-04-16 41
^1da177e4c3f415 include/asm-ia64/page.h Linus Torvalds 2005-04-16 @42 #define PAGE_SIZE (__IA64_UL_CONST(1) << PAGE_SHIFT)
^1da177e4c3f415 include/asm-ia64/page.h Linus Torvalds 2005-04-16 43 #define PAGE_MASK (~(PAGE_SIZE - 1))
^1da177e4c3f415 include/asm-ia64/page.h Linus Torvalds 2005-04-16 44
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip