All of lore.kernel.org
 help / color / mirror / Atom feed
* [sashal-linux-stable:queue-4.4 23/30] fs/sysfs/file.c:596:55: warning: comparison of integer expressions of different signedness: 'int' and 'long unsigned int'
@ 2021-03-07  9:21 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-03-07  9:21 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3419 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-4.4
head:   ff7a43e4414e3d3278653d90b18980d63818f6df
commit: 7505e48fade906e6fd8f30abe4909f356fab4b9e [23/30] sysfs: Add sysfs_emit and sysfs_emit_at to format sysfs output
config: mips-decstation_defconfig (attached as .config)
compiler: mipsel-linux-gcc (GCC) 9.3.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://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/commit/?id=7505e48fade906e6fd8f30abe4909f356fab4b9e
        git remote add sashal-linux-stable https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
        git fetch --no-tags sashal-linux-stable queue-4.4
        git checkout 7505e48fade906e6fd8f30abe4909f356fab4b9e
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   fs/sysfs/file.c: In function 'sysfs_kf_seq_show':
   fs/sysfs/file.c:53:12: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'int'} and 'long unsigned int' [-Wsign-compare]
      53 |  if (count < PAGE_SIZE) {
         |            ^
   In file included from arch/mips/include/asm/bug.h:41,
                    from include/linux/bug.h:4,
                    from include/linux/thread_info.h:11,
                    from include/asm-generic/preempt.h:4,
                    from arch/mips/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:59,
                    from include/linux/spinlock.h:50,
                    from include/linux/seqlock.h:35,
                    from include/linux/time.h:5,
                    from include/linux/stat.h:18,
                    from include/linux/module.h:10,
                    from fs/sysfs/file.c:13:
   fs/sysfs/file.c: In function 'sysfs_emit_at':
>> fs/sysfs/file.c:596:55: warning: comparison of integer expressions of different signedness: 'int' and 'long unsigned int' [-Wsign-compare]
     596 |  if (WARN(!buf || offset_in_page(buf) || at < 0 || at >= PAGE_SIZE,
         |                                                       ^~
   include/asm-generic/bug.h:96:25: note: in definition of macro 'WARN'
      96 |  int __ret_warn_on = !!(condition);    \
         |                         ^~~~~~~~~


vim +596 fs/sysfs/file.c

   579	
   580	/**
   581	 *	sysfs_emit_at - scnprintf equivalent, aware of PAGE_SIZE buffer.
   582	 *	@buf:	start of PAGE_SIZE buffer.
   583	 *	@at:	offset in @buf to start write in bytes
   584	 *		@at must be >= 0 && < PAGE_SIZE
   585	 *	@fmt:	format
   586	 *	@...:	optional arguments to @fmt
   587	 *
   588	 *
   589	 * Returns number of characters written starting@&@buf[@at].
   590	 */
   591	int sysfs_emit_at(char *buf, int at, const char *fmt, ...)
   592	{
   593		va_list args;
   594		int len;
   595	
 > 596		if (WARN(!buf || offset_in_page(buf) || at < 0 || at >= PAGE_SIZE,

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 9222 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-03-07  9:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-07  9:21 [sashal-linux-stable:queue-4.4 23/30] fs/sysfs/file.c:596:55: warning: comparison of integer expressions of different signedness: 'int' and 'long unsigned int' kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.