lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202507011152.ULf4bZsW-lkp@intel.com>
Date: Tue, 1 Jul 2025 12:30:10 +0800
From: kernel test robot <lkp@...el.com>
To: Ryan Chung <seokwoo.chung130@...il.com>, hao.wu@...el.com,
	trix@...hat.com, mdf@...nel.org, yilun.xu@...el.com
Cc: oe-kbuild-all@...ts.linux.dev, linux-fpga@...r.kernel.org,
	linux-kernel-mentees@...ts.linux.dev, linux-kernel@...r.kernel.org,
	Ryan Chung <seokwoo.chung130@...il.com>
Subject: Re: [PATCH] fpga: dfl: Replace scnprintf() with sysfs_emit()

Hi Ryan,

kernel test robot noticed the following build warnings:

[auto build test WARNING on linus/master]
[also build test WARNING on v6.16-rc4 next-20250630]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Ryan-Chung/fpga-dfl-Replace-scnprintf-with-sysfs_emit/20250630-205221
base:   linus/master
patch link:    https://lore.kernel.org/r/20250630125018.48417-1-seokwoo.chung130%40gmail.com
patch subject: [PATCH] fpga: dfl: Replace scnprintf() with sysfs_emit()
config: x86_64-randconfig-001-20250701 (https://download.01.org/0day-ci/archive/20250701/202507011152.ULf4bZsW-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14+deb12u1) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250701/202507011152.ULf4bZsW-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202507011152.ULf4bZsW-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from arch/x86/include/asm/page_types.h:9,
                    from arch/x86/include/asm/ptrace.h:6,
                    from arch/x86/include/asm/math_emu.h:5,
                    from arch/x86/include/asm/processor.h:13,
                    from arch/x86/include/asm/timex.h:5,
                    from include/linux/timex.h:67,
                    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/fpga/dfl-afu-main.c:18:
   drivers/fpga/dfl-afu-main.c: In function 'id_show':
>> include/vdso/page.h:15:25: warning: passing argument 2 of 'sysfs_emit' makes pointer from integer without a cast [-Wint-conversion]
      15 | #define PAGE_SIZE       (_AC(1,UL) << CONFIG_PAGE_SHIFT)
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                         |
         |                         long unsigned int
   drivers/fpga/dfl-afu-main.c:159:32: note: in expansion of macro 'PAGE_SIZE'
     159 |         return sysfs_emit(buf, PAGE_SIZE, "%d\n", id);
         |                                ^~~~~~~~~
   In file included from include/linux/kobject.h:20,
                    from include/linux/module.h:21:
   include/linux/sysfs.h:492:39: note: expected 'const char *' but argument is of type 'long unsigned int'
     492 | int sysfs_emit(char *buf, const char *fmt, ...);
         |                           ~~~~~~~~~~~~^~~
   drivers/fpga/dfl-afu-main.c: In function 'afu_id_show':
>> include/vdso/page.h:15:25: warning: passing argument 2 of 'sysfs_emit' makes pointer from integer without a cast [-Wint-conversion]
      15 | #define PAGE_SIZE       (_AC(1,UL) << CONFIG_PAGE_SHIFT)
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                         |
         |                         long unsigned int
   drivers/fpga/dfl-afu-main.c:478:32: note: in expansion of macro 'PAGE_SIZE'
     478 |         return sysfs_emit(buf, PAGE_SIZE, "%016llx%016llx\n", guidh, guidl);
         |                                ^~~~~~~~~
   include/linux/sysfs.h:492:39: note: expected 'const char *' but argument is of type 'long unsigned int'
     492 | int sysfs_emit(char *buf, const char *fmt, ...);
         |                           ~~~~~~~~~~~~^~~
--
   In file included from arch/x86/include/asm/page_types.h:9,
                    from arch/x86/include/asm/ptrace.h:6,
                    from arch/x86/include/asm/math_emu.h:5,
                    from arch/x86/include/asm/processor.h:13,
                    from arch/x86/include/asm/timex.h:5,
                    from include/linux/timex.h:67,
                    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 dfl-afu-main.c:18:
   dfl-afu-main.c: In function 'id_show':
>> include/vdso/page.h:15:25: warning: passing argument 2 of 'sysfs_emit' makes pointer from integer without a cast [-Wint-conversion]
      15 | #define PAGE_SIZE       (_AC(1,UL) << CONFIG_PAGE_SHIFT)
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                         |
         |                         long unsigned int
   dfl-afu-main.c:159:32: note: in expansion of macro 'PAGE_SIZE'
     159 |         return sysfs_emit(buf, PAGE_SIZE, "%d\n", id);
         |                                ^~~~~~~~~
   In file included from include/linux/kobject.h:20,
                    from include/linux/module.h:21:
   include/linux/sysfs.h:492:39: note: expected 'const char *' but argument is of type 'long unsigned int'
     492 | int sysfs_emit(char *buf, const char *fmt, ...);
         |                           ~~~~~~~~~~~~^~~
   dfl-afu-main.c: In function 'afu_id_show':
>> include/vdso/page.h:15:25: warning: passing argument 2 of 'sysfs_emit' makes pointer from integer without a cast [-Wint-conversion]
      15 | #define PAGE_SIZE       (_AC(1,UL) << CONFIG_PAGE_SHIFT)
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                         |
         |                         long unsigned int
   dfl-afu-main.c:478:32: note: in expansion of macro 'PAGE_SIZE'
     478 |         return sysfs_emit(buf, PAGE_SIZE, "%016llx%016llx\n", guidh, guidl);
         |                                ^~~~~~~~~
   include/linux/sysfs.h:492:39: note: expected 'const char *' but argument is of type 'long unsigned int'
     492 | int sysfs_emit(char *buf, const char *fmt, ...);
         |                           ~~~~~~~~~~~~^~~


vim +/sysfs_emit +15 include/vdso/page.h

efe8419ae78d65e Vincenzo Frascino 2024-10-14  14  
efe8419ae78d65e Vincenzo Frascino 2024-10-14 @15  #define PAGE_SIZE	(_AC(1,UL) << CONFIG_PAGE_SHIFT)
efe8419ae78d65e Vincenzo Frascino 2024-10-14  16  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ