From: kernel test robot <lkp@intel.com>
To: Bill Wendling <morbo@google.com>
Cc: oe-kbuild-all@lists.linux.dev,
Christian Brauner <christianvanbrauner@gmail.com>,
Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>
Subject: [brauner-vfs:vfs-7.4.file 2/3] fs/tests/fdtable_kunit.c:25:9: sparse: sparse: incompatible types for operation (==):
Date: Fri, 11 Sep 2026 19:18:51 +0800 [thread overview]
Message-ID: <202609111828.SjerhPyO-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git vfs-7.4.file
head: f5ae3d9f2940d7ab17f0c186bda880e13d18bde7
commit: 501cbbd276b77d34af20ea3dd4f897c93630bac8 [2/3] vfs: Add KUnit tests for fdtable
config: alpha-randconfig-r111-20260910 (https://download.01.org/0day-ci/archive/20260911/202609111828.SjerhPyO-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 16.1.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260911/202609111828.SjerhPyO-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/202609111828.SjerhPyO-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
fs/file.c:438:17: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct file **old_fds @@ got struct file [noderef] __rcu **fd @@
fs/file.c:438:17: sparse: expected struct file **old_fds
fs/file.c:438:17: sparse: got struct file [noderef] __rcu **fd
fs/file.c:439:17: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct file **new_fds @@ got struct file [noderef] __rcu **fd @@
fs/file.c:439:17: sparse: expected struct file **new_fds
fs/file.c:439:17: sparse: got struct file [noderef] __rcu **fd
fs/file.c:462:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
fs/file.c:462:17: sparse: struct file [noderef] __rcu *
fs/file.c:462:17: sparse: struct file *
fs/file.c:492:60: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct file *file @@ got struct file [noderef] __rcu * @@
fs/file.c:532:28: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct fdtable [noderef] __rcu *fdt @@ got struct fdtable * @@
fs/file.c:911:30: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct file *file @@ got struct file [noderef] __rcu * @@
fs/file.c:932:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct file [noderef] __rcu *file @@ got struct file * @@
fs/file.c:936:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct file_ref_t [usertype] *ref @@ got struct file_ref_t [noderef] __rcu * @@
fs/file.c:939:23: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct file [noderef] __rcu *file_reloaded @@ got struct file * @@
fs/file.c:962:24: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected struct file * @@ got struct file [noderef] __rcu *file_reloaded @@
fs/file.c:964:14: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct file * @@ got struct file [noderef] __rcu *file @@
fs/file.c:985:22: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct file [noderef] __rcu *file @@ got struct file * @@
fs/file.c:987:32: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected struct file * @@ got struct file [noderef] __rcu *file @@
fs/file.c:1009:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct file [noderef] __rcu **f @@ got struct file **f @@
fs/file.c:1009:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct file [noderef] __rcu *file @@ got struct file * @@
fs/file.c:1013:16: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected struct file * @@ got struct file [noderef] __rcu *[assigned] file @@
fs/file.c: note: in included file:
fs/tests/fdtable_kunit.c:25:9: sparse: sparse: undefined identifier '__builtin_dynamic_object_size'
fs/tests/fdtable_kunit.c:25:9: sparse: sparse: undefined identifier '__builtin_dynamic_object_size'
>> fs/tests/fdtable_kunit.c:25:9: sparse: sparse: incompatible types for operation (==):
fs/tests/fdtable_kunit.c:25:9: sparse: bad type const __left
fs/tests/fdtable_kunit.c:25:9: sparse: unsigned long const __right
fs/tests/fdtable_kunit.c:54:9: sparse: sparse: undefined identifier '__builtin_dynamic_object_size'
fs/tests/fdtable_kunit.c:54:9: sparse: sparse: undefined identifier '__builtin_dynamic_object_size'
fs/tests/fdtable_kunit.c:54:9: sparse: sparse: incompatible types for operation (==):
fs/tests/fdtable_kunit.c:54:9: sparse: bad type const __left
fs/tests/fdtable_kunit.c:54:9: sparse: unsigned long const __right
vim +25 fs/tests/fdtable_kunit.c
5
6 static void test_alloc_fdtable(struct kunit *test)
7 {
8 struct fdtable *fdt;
9 unsigned int slots = 64;
10
11 fdt = alloc_fdtable(slots);
12 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, fdt);
13
14 /* Check that max_fds is set correctly and is >= slots */
15 KUNIT_EXPECT_GE(test, fdt->max_fds, slots);
16
17 /* Check that fd is allocated */
18 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, fdt->fd);
19
20 /*
21 * Check dynamic object size of fdt->fd if compiler supports
22 * __counted_by_ptr.
23 */
24 #ifdef CONFIG_CC_HAS_COUNTED_BY_PTR
> 25 KUNIT_EXPECT_EQ(test, __builtin_dynamic_object_size(fdt->fd, 0),
26 fdt->max_fds * sizeof(struct file *));
27 #endif
28
29 __free_fdtable(fdt);
30 }
31
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2026-09-11 11:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-11 11:18 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-09-11 5:43 [brauner-vfs:vfs-7.4.file 2/3] fs/tests/fdtable_kunit.c:25:9: sparse: sparse: incompatible types for operation (==): kernel test robot
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=202609111828.SjerhPyO-lkp@intel.com \
--to=lkp@intel.com \
--cc=brauner@kernel.org \
--cc=christianvanbrauner@gmail.com \
--cc=jack@suse.cz \
--cc=morbo@google.com \
--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.