From: kernel test robot <lkp@intel.com>
To: Jeff Layton <jlayton@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [jlayton:dir-deleg 39/39] fs/nfsd/nfs4state.c:5493:6: error: redefinition of 'mask'
Date: Sun, 20 Oct 2024 16:38:38 +0800 [thread overview]
Message-ID: <202410201607.joGn9Azm-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git dir-deleg
head: 380a610024a1525d57e7d65bb495f7ecb87cb5ff
commit: 380a610024a1525d57e7d65bb495f7ecb87cb5ff [39/39] nfsd: add notification handlers for dir events
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20241020/202410201607.joGn9Azm-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241020/202410201607.joGn9Azm-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/202410201607.joGn9Azm-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
>> fs/nfsd/nfs4state.c:5493:6: error: redefinition of 'mask'
5493 | u32 mask = 0;
| ^
fs/nfsd/nfs4state.c:5488:31: note: previous definition is here
5488 | int nfsd_handle_dir_event(u32 mask, const struct inode *inode, const struct inode *dir,
| ^
>> fs/nfsd/nfs4state.c:5501:27: error: expected expression
5501 | struct file_lease *fl = container_of(struct file_lock_core,
| ^
include/linux/container_of.h:19:30: note: expanded from macro 'container_of'
19 | void *__mptr = (void *)(ptr); \
| ^
>> fs/nfsd/nfs4state.c:5501:27: error: expected expression
include/linux/container_of.h:20:16: note: expanded from macro 'container_of'
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^
include/linux/compiler_types.h:458:64: note: expanded from macro '__same_type'
458 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
| ^
>> fs/nfsd/nfs4state.c:5501:27: error: expected expression
include/linux/container_of.h:21:9: note: expanded from macro 'container_of'
21 | __same_type(*(ptr), void), \
| ^
include/linux/compiler_types.h:458:64: note: expanded from macro '__same_type'
458 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
| ^
>> fs/nfsd/nfs4state.c:5501:27: error: no member named 'flc_list' in 'file_lease'
5501 | struct file_lease *fl = container_of(struct file_lock_core,
| ^
5502 | struct file_lease, flc_list);
| ~~~~~~~~
include/linux/container_of.h:23:21: note: expanded from macro 'container_of'
23 | ((type *)(__mptr - offsetof(type, member))); })
| ^ ~~~~~~
include/linux/stddef.h:16:32: note: expanded from macro 'offsetof'
16 | #define offsetof(TYPE, MEMBER) __builtin_offsetof(TYPE, MEMBER)
| ^ ~~~~~~
>> fs/nfsd/nfs4state.c:5501:22: error: initializing 'struct file_lease *' with an expression of incompatible type 'void'
5501 | struct file_lease *fl = container_of(struct file_lock_core,
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5502 | struct file_lease, flc_list);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> fs/nfsd/nfs4state.c:5505:12: error: no member named 'fl_lmops' in 'struct file_lock_core'
5505 | if (flc->fl_lmops != &nfsd_dir_lease_mng_ops)
| ~~~ ^
>> fs/nfsd/nfs4state.c:5510:40: error: member reference type 'const struct qstr *' is a pointer; did you mean to use '->'?
5510 | component4 oldname = { .count = name.len, .element = name.name }
| ~~~~^
| ->
fs/nfsd/nfs4state.c:5510:61: error: member reference type 'const struct qstr *' is a pointer; did you mean to use '->'?
5510 | component4 oldname = { .count = name.len, .element = name.name }
| ~~~~^
| ->
>> fs/nfsd/nfs4state.c:5510:28: error: field designator 'count' does not refer to any field in type 'component4' (aka 'opaque')
5510 | component4 oldname = { .count = name.len, .element = name.name }
| ~^~~~~~~~~~~~~~~~
>> fs/nfsd/nfs4state.c:5510:47: error: field designator 'element' does not refer to any field in type 'component4' (aka 'opaque')
5510 | component4 oldname = { .count = name.len, .element = name.name }
| ~^~~~~~~~~~~~~~~~~~~
>> fs/nfsd/nfs4state.c:5510:68: error: expected ';' at end of declaration
5510 | component4 oldname = { .count = name.len, .element = name.name }
| ^
| ;
>> fs/nfsd/nfs4state.c:5513:29: error: no member named 'count' in 'opaque'
5513 | nr.nrm_old_entry.ne_file.count = name.len;
| ~~~~~~~~~~~~~~~~~~~~~~~~ ^
fs/nfsd/nfs4state.c:5513:41: error: member reference type 'const struct qstr *' is a pointer; did you mean to use '->'?
5513 | nr.nrm_old_entry.ne_file.count = name.len;
| ~~~~^
| ->
>> fs/nfsd/nfs4state.c:5514:29: error: no member named 'element' in 'opaque'
5514 | nr.nrm_old_entry.ne_file.element = name.name;
| ~~~~~~~~~~~~~~~~~~~~~~~~ ^
fs/nfsd/nfs4state.c:5514:43: error: member reference type 'const struct qstr *' is a pointer; did you mean to use '->'?
5514 | nr.nrm_old_entry.ne_file.element = name.name;
| ~~~~^
| ->
>> fs/nfsd/nfs4state.c:5516:26: error: redefinition of 'nr'
5516 | struct notify_remove4 nr;
| ^
fs/nfsd/nfs4state.c:5511:26: note: previous definition is here
5511 | struct notify_remove4 nr = { };
| ^
>> fs/nfsd/nfs4state.c:5488:5: warning: no previous prototype for function 'nfsd_handle_dir_event' [-Wmissing-prototypes]
5488 | int nfsd_handle_dir_event(u32 mask, const struct inode *inode, const struct inode *dir,
| ^
fs/nfsd/nfs4state.c:5488:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
5488 | int nfsd_handle_dir_event(u32 mask, const struct inode *inode, const struct inode *dir,
| ^
| static
1 warning and 17 errors generated.
vim +/mask +5493 fs/nfsd/nfs4state.c
5487
> 5488 int nfsd_handle_dir_event(u32 mask, const struct inode *inode, const struct inode *dir,
5489 const struct qstr *name)
5490 {
5491 struct file_lock_context *ctx;
5492 struct file_lock_core *flc;
> 5493 u32 mask = 0;
5494
5495 ctx = locks_inode_context(inode);
5496 if (!ctx)
5497 return 0;
5498
5499 spin_lock(&ctx->flc_lock);
5500 list_for_each_entry(flc, &ctx->flc_lease, flc_list) {
> 5501 struct file_lease *fl = container_of(struct file_lock_core,
5502 struct file_lease, flc_list);
5503 struct nfs4_delegation *dp = flc->flc_owner;
5504
> 5505 if (flc->fl_lmops != &nfsd_dir_lease_mng_ops)
5506 continue;
5507
5508 /* find delegation, check IGN bits, marshal notify if they match */
5509 if (mask & FS_DELETE) {
> 5510 component4 oldname = { .count = name.len, .element = name.name }
5511 struct notify_remove4 nr = { };
5512
> 5513 nr.nrm_old_entry.ne_file.count = name.len;
> 5514 nr.nrm_old_entry.ne_file.element = name.name;
5515
> 5516 struct notify_remove4 nr;
5517
5518 if (!(flc->flc_flags & FL_IGN_DIR_DELETE))
5519 continue;
5520 }
5521
5522 }
5523 spin_unlock(&ctx->flc_lock);
5524 }
5525
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-10-20 8:39 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=202410201607.joGn9Azm-lkp@intel.com \
--to=lkp@intel.com \
--cc=jlayton@kernel.org \
--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