From: kernel test robot <lkp@intel.com>
To: Jeff Layton <jlayton@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [jlayton:dir-deleg 39/39] fs/nfsd/nfs4state.c:5493:13: error: 'mask' redeclared as different kind of symbol
Date: Sun, 20 Oct 2024 16:17:58 +0800 [thread overview]
Message-ID: <202410201645.Db3PJaxx-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-rhel-8.3 (https://download.01.org/0day-ci/archive/20241020/202410201645.Db3PJaxx-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/20241020/202410201645.Db3PJaxx-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/202410201645.Db3PJaxx-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
>> fs/nfsd/nfs4state.c:5488:5: warning: no previous prototype for '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: In function 'nfsd_handle_dir_event':
>> fs/nfsd/nfs4state.c:5493:13: error: 'mask' redeclared as different kind of symbol
5493 | u32 mask = 0;
| ^~~~
fs/nfsd/nfs4state.c:5488:31: note: previous definition of 'mask' with type 'u32' {aka 'unsigned int'}
5488 | int nfsd_handle_dir_event(u32 mask, const struct inode *inode, const struct inode *dir,
| ~~~~^~~~
In file included from include/linux/list.h:5,
from include/linux/wait.h:7,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from fs/nfsd/nfs4state.c:36:
>> include/linux/container_of.h:19:37: error: expected expression before ';' token
19 | void *__mptr = (void *)(ptr); \
| ^
fs/nfsd/nfs4state.c:5501:41: note: in expansion of macro 'container_of'
5501 | struct file_lease *fl = container_of(struct file_lock_core,
| ^~~~~~~~~~~~
In file included from include/linux/container_of.h:5:
>> include/linux/compiler_types.h:458:64: error: expected expression before ')' token
458 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
| ^
include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
include/linux/container_of.h:20:9: note: in expansion of macro 'static_assert'
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~~~
include/linux/container_of.h:20:23: note: in expansion of macro '__same_type'
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~
fs/nfsd/nfs4state.c:5501:41: note: in expansion of macro 'container_of'
5501 | struct file_lease *fl = container_of(struct file_lock_core,
| ^~~~~~~~~~~~
>> include/linux/container_of.h:20:54: error: 'struct file_lease' has no member named 'flc_list'
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~
include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
include/linux/container_of.h:20:9: note: in expansion of macro 'static_assert'
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~~~
include/linux/container_of.h:20:23: note: in expansion of macro '__same_type'
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~
fs/nfsd/nfs4state.c:5501:41: note: in expansion of macro 'container_of'
5501 | struct file_lease *fl = container_of(struct file_lock_core,
| ^~~~~~~~~~~~
>> include/linux/compiler_types.h:458:27: error: expression in static assertion is not an integer
458 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
include/linux/container_of.h:20:9: note: in expansion of macro 'static_assert'
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~~~
include/linux/container_of.h:20:23: note: in expansion of macro '__same_type'
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~
fs/nfsd/nfs4state.c:5501:41: note: in expansion of macro 'container_of'
5501 | struct file_lease *fl = container_of(struct file_lock_core,
| ^~~~~~~~~~~~
In file included from include/uapi/linux/posix_types.h:5,
from include/uapi/linux/types.h:14,
from include/linux/types.h:6,
from include/linux/kasan-checks.h:5,
from include/asm-generic/rwonce.h:26,
from ./arch/x86/include/generated/asm/rwonce.h:1,
from include/linux/compiler.h:317,
from include/linux/file.h:9,
from fs/nfsd/nfs4state.c:35:
>> include/linux/stddef.h:16:33: error: 'struct file_lease' has no member named 'flc_list'
16 | #define offsetof(TYPE, MEMBER) __builtin_offsetof(TYPE, MEMBER)
| ^~~~~~~~~~~~~~~~~~
include/linux/container_of.h:23:28: note: in expansion of macro 'offsetof'
23 | ((type *)(__mptr - offsetof(type, member))); })
| ^~~~~~~~
fs/nfsd/nfs4state.c:5501:41: note: in expansion of macro 'container_of'
5501 | struct file_lease *fl = container_of(struct file_lock_core,
| ^~~~~~~~~~~~
>> fs/nfsd/nfs4state.c:5505:24: error: 'struct file_lock_core' has no member named 'fl_lmops'
5505 | if (flc->fl_lmops != &nfsd_dir_lease_mng_ops)
| ^~
>> fs/nfsd/nfs4state.c:5510:49: error: 'component4' {aka 'opaque'} has no member named 'count'
5510 | component4 oldname = { .count = name.len, .element = name.name }
| ^~~~~
>> fs/nfsd/nfs4state.c:5510:61: error: 'name' is a pointer; did you mean to use '->'?
5510 | component4 oldname = { .count = name.len, .element = name.name }
| ^
| ->
>> fs/nfsd/nfs4state.c:5510:68: error: 'component4' {aka 'opaque'} has no member named 'element'
5510 | component4 oldname = { .count = name.len, .element = name.name }
| ^~~~~~~
fs/nfsd/nfs4state.c:5510:82: error: 'name' is a pointer; did you mean to use '->'?
5510 | component4 oldname = { .count = name.len, .element = name.name }
| ^
| ->
>> fs/nfsd/nfs4state.c:5511:25: error: expected ',' or ';' before 'struct'
5511 | struct notify_remove4 nr = { };
| ^~~~~~
>> fs/nfsd/nfs4state.c:5513:25: error: 'nr' undeclared (first use in this function)
5513 | nr.nrm_old_entry.ne_file.count = name.len;
| ^~
fs/nfsd/nfs4state.c:5513:25: note: each undeclared identifier is reported only once for each function it appears in
fs/nfsd/nfs4state.c:5513:62: error: 'name' is a pointer; did you mean to use '->'?
5513 | nr.nrm_old_entry.ne_file.count = name.len;
| ^
| ->
fs/nfsd/nfs4state.c:5514:64: error: 'name' is a pointer; did you mean to use '->'?
5514 | nr.nrm_old_entry.ne_file.element = name.name;
| ^
| ->
>> fs/nfsd/nfs4state.c:5516:47: warning: unused variable 'nr' [-Wunused-variable]
5516 | struct notify_remove4 nr;
| ^~
>> fs/nfsd/nfs4state.c:5510:36: warning: unused variable 'oldname' [-Wunused-variable]
5510 | component4 oldname = { .count = name.len, .element = name.name }
| ^~~~~~~
>> fs/nfsd/nfs4state.c:5503:41: warning: unused variable 'dp' [-Wunused-variable]
5503 | struct nfs4_delegation *dp = flc->flc_owner;
| ^~
>> fs/nfsd/nfs4state.c:5501:36: warning: unused variable 'fl' [-Wunused-variable]
5501 | struct file_lease *fl = container_of(struct file_lock_core,
| ^~
>> fs/nfsd/nfs4state.c:5489:46: warning: parameter 'name' set but not used [-Wunused-but-set-parameter]
5489 | const struct qstr *name)
| ~~~~~~~~~~~~~~~~~~~^~~~
>> fs/nfsd/nfs4state.c:5524:1: warning: control reaches end of non-void function [-Wreturn-type]
5524 | }
| ^
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:18 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=202410201645.Db3PJaxx-lkp@intel.com \
--to=lkp@intel.com \
--cc=jlayton@kernel.org \
--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.