All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Kent Overstreet <kent.overstreet@linux.dev>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [koverstreet-bcachefs:bcachefs-testing 259/259] arch/x86/include/asm/string_32.h:195:29: warning: 'memset' used with constant zero length parameter; this could be due to transposed parameters
Date: Thu, 22 May 2025 02:49:48 +0800	[thread overview]
Message-ID: <202505220250.LTGElWSM-lkp@intel.com> (raw)

tree:   https://github.com/koverstreet/bcachefs bcachefs-testing
head:   931ffb231a45d53ede3ea0e28f28de35c7817a55
commit: 931ffb231a45d53ede3ea0e28f28de35c7817a55 [259/259] fs: dcache exlusion between overlayfs, casefolding
config: i386-buildonly-randconfig-003-20250522 (https://download.01.org/0day-ci/archive/20250522/202505220250.LTGElWSM-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250522/202505220250.LTGElWSM-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202505220250.LTGElWSM-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from arch/x86/include/asm/string.h:3,
                    from arch/x86/include/asm/cpuid/api.h:10,
                    from arch/x86/include/asm/cpuid.h:6,
                    from arch/x86/include/asm/processor.h:19,
                    from include/linux/sched.h:13,
                    from include/linux/ratelimit.h:6,
                    from fs/dcache.c:18:
   fs/dcache.c: In function 'd_casefold_enable':
>> arch/x86/include/asm/string_32.h:195:29: warning: 'memset' used with constant zero length parameter; this could be due to transposed parameters [-Wmemset-transposed-args]
     195 | #define memset(s, c, count) __builtin_memset(s, c, count)
         |                             ^~~~~~~~~~~~~~~~
   fs/dcache.c:3307:9: note: in expansion of macro 'memset'
    3307 |         memset(e, sizeof(*e), 0);
         |         ^~~~~~


vim +/memset +195 arch/x86/include/asm/string_32.h

^1da177e4c3f41 include/asm-i386/string.h        Linus Torvalds   2005-04-16  186  
^1da177e4c3f41 include/asm-i386/string.h        Linus Torvalds   2005-04-16  187  #define __memset(s, c, count)				\
78d64fc21d2aa4 include/asm-x86/string_32.h      Joe Perches      2008-05-12  188  	(__builtin_constant_p(count)			\
78d64fc21d2aa4 include/asm-x86/string_32.h      Joe Perches      2008-05-12  189  	 ? __constant_count_memset((s), (c), (count))	\
78d64fc21d2aa4 include/asm-x86/string_32.h      Joe Perches      2008-05-12  190  	 : __memset_generic((s), (c), (count)))
^1da177e4c3f41 include/asm-i386/string.h        Linus Torvalds   2005-04-16  191  
^1da177e4c3f41 include/asm-i386/string.h        Linus Torvalds   2005-04-16  192  #define __HAVE_ARCH_MEMSET
6974f0c4555e28 arch/x86/include/asm/string_32.h Daniel Micay     2017-07-12  193  extern void *memset(void *, int, size_t);
6974f0c4555e28 arch/x86/include/asm/string_32.h Daniel Micay     2017-07-12  194  #ifndef CONFIG_FORTIFY_SOURCE
ff60fab71bb3b4 arch/x86/include/asm/string_32.h Arjan van de Ven 2009-09-28 @195  #define memset(s, c, count) __builtin_memset(s, c, count)
6974f0c4555e28 arch/x86/include/asm/string_32.h Daniel Micay     2017-07-12  196  #endif /* !CONFIG_FORTIFY_SOURCE */
^1da177e4c3f41 include/asm-i386/string.h        Linus Torvalds   2005-04-16  197  

:::::: The code at line 195 was first introduced by commit
:::::: ff60fab71bb3b4fdbf8caf57ff3739ffd0887396 x86: Use __builtin_memset and __builtin_memcpy for memset/memcpy

:::::: TO: Arjan van de Ven <arjan@infradead.org>
:::::: CC: H. Peter Anvin <hpa@zytor.com>

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

                 reply	other threads:[~2025-05-21 18:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202505220250.LTGElWSM-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kent.overstreet@linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.