From: kernel test robot <lkp@intel.com>
To: David Howells <dhowells@redhat.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [dhowells-fs:ceph-iter 43/43] include/linux/poll.h:134:27: warning: division by zero is undefined
Date: Thu, 30 Jan 2025 15:05:34 +0800 [thread overview]
Message-ID: <202501301508.7Z6gbNaF-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git ceph-iter
head: 99bca1b95b54b7a3e7260c2431b587639482a71d
commit: 99bca1b95b54b7a3e7260c2431b587639482a71d [43/43] ceph: Use netfslib
config: mips-jazz_defconfig (https://download.01.org/0day-ci/archive/20250130/202501301508.7Z6gbNaF-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 19306351a2c45e266fa11b41eb1362b20b6ca56d)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250130/202501301508.7Z6gbNaF-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/202501301508.7Z6gbNaF-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from fs/smb/client/smb2pdu.c:27:
include/trace/events/netfs.h:249:25: error: redefinition of enumerator 'netfs_sreq_trace_need_retry'
249 | enum netfs_sreq_trace { netfs_sreq_traces } __mode(byte);
| ^
include/trace/events/netfs.h:110:5: note: expanded from macro 'netfs_sreq_traces'
110 | EM(netfs_sreq_trace_need_retry, "ND-RT") \
| ^
include/trace/events/netfs.h:249:25: note: previous definition is here
include/trace/events/netfs.h:107:5: note: expanded from macro 'netfs_sreq_traces'
107 | EM(netfs_sreq_trace_need_retry, "NRTRY") \
| ^
In file included from fs/smb/client/smb2pdu.c:28:
In file included from fs/smb/client/cifsglob.h:28:
In file included from fs/smb/client/smb2pdu.h:14:
In file included from include/net/sock.h:60:
>> include/linux/poll.h:134:27: warning: division by zero is undefined [-Wdivision-by-zero]
134 | M(RDNORM) | M(RDBAND) | M(WRNORM) | M(WRBAND) |
| ^~~~~~~~~
include/linux/poll.h:132:32: note: expanded from macro 'M'
132 | #define M(X) (__force __poll_t)__MAP(val, POLL##X, (__force __u16)EPOLL##X)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/poll.h:118:51: note: expanded from macro '__MAP'
118 | (from < to ? (v & from) * (to/from) : (v & from) / (from/to))
| ^ ~~~~~~~~~
include/linux/poll.h:134:39: warning: division by zero is undefined [-Wdivision-by-zero]
134 | M(RDNORM) | M(RDBAND) | M(WRNORM) | M(WRBAND) |
| ^~~~~~~~~
include/linux/poll.h:132:32: note: expanded from macro 'M'
132 | #define M(X) (__force __poll_t)__MAP(val, POLL##X, (__force __u16)EPOLL##X)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/poll.h:118:51: note: expanded from macro '__MAP'
118 | (from < to ? (v & from) * (to/from) : (v & from) / (from/to))
| ^ ~~~~~~~~~
2 warnings and 1 error generated.
vim +134 include/linux/poll.h
7a163b2195cda0 Al Viro 2018-02-01 129
7a163b2195cda0 Al Viro 2018-02-01 130 static inline __poll_t demangle_poll(u16 val)
7a163b2195cda0 Al Viro 2018-02-01 131 {
7a163b2195cda0 Al Viro 2018-02-01 132 #define M(X) (__force __poll_t)__MAP(val, POLL##X, (__force __u16)EPOLL##X)
7a163b2195cda0 Al Viro 2018-02-01 133 return M(IN) | M(OUT) | M(PRI) | M(ERR) | M(NVAL) |
7a163b2195cda0 Al Viro 2018-02-01 @134 M(RDNORM) | M(RDBAND) | M(WRNORM) | M(WRBAND) |
7a163b2195cda0 Al Viro 2018-02-01 135 M(HUP) | M(RDHUP) | M(MSG);
7a163b2195cda0 Al Viro 2018-02-01 136 #undef M
7a163b2195cda0 Al Viro 2018-02-01 137 }
7a163b2195cda0 Al Viro 2018-02-01 138 #undef __MAP
7a163b2195cda0 Al Viro 2018-02-01 139
7a163b2195cda0 Al Viro 2018-02-01 140
:::::: The code at line 134 was first introduced by commit
:::::: 7a163b2195cda0cddf47b5caf14a7229d4e2bea3 unify {de,}mangle_poll(), get rid of kernel-side POLL...
:::::: TO: Al Viro <viro@zeniv.linux.org.uk>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-01-30 7:05 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=202501301508.7Z6gbNaF-lkp@intel.com \
--to=lkp@intel.com \
--cc=dhowells@redhat.com \
--cc=llvm@lists.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox