Re: fs/nfs/nfs4super.c:232:17: sparse: sparse: incompatible types in conditional expression (different base types):

From: Chuck Lever

Date: Thu May 14 2026 - 13:40:09 EST


On 5/14/26 1:03 AM, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: e1914add2799225a87502051415fc5c32aeb02ae
> commit: 6f57293abb8d087de830dd3f02e66d94b3e59973 sunrpc: Fix compilation error (`make W=1`) when dprintk() is no-op
> date: 6 weeks ago
> config: x86_64-randconfig-121-20260514 (https://download.01.org/0day-ci/archive/20260514/202605141218.uA0wk544-lkp@xxxxxxxxx/config)
> compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
> sparse: v0.6.5-rc1
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260514/202605141218.uA0wk544-lkp@xxxxxxxxx/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
> | Fixes: 6f57293abb8d ("sunrpc: Fix compilation error (`make W=1`) when dprintk() is no-op")
> | Reported-by: kernel test robot <lkp@xxxxxxxxx>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202605141218.uA0wk544-lkp@xxxxxxxxx/
>
> sparse warnings: (new ones prefixed by >>)
>>> fs/nfs/nfs4super.c:232:17: sparse: sparse: incompatible types in conditional expression (different base types):
> fs/nfs/nfs4super.c:232:17: sparse: void
> fs/nfs/nfs4super.c:232:17: sparse: int
> fs/nfs/nfs4super.c:255:17: sparse: sparse: incompatible types in conditional expression (different base types):
> fs/nfs/nfs4super.c:255:17: sparse: void
> fs/nfs/nfs4super.c:255:17: sparse: int
> --
>>> fs/nfs/getroot.c:90:17: sparse: sparse: incompatible types in conditional expression (different base types):
> fs/nfs/getroot.c:90:17: sparse: void
> fs/nfs/getroot.c:90:17: sparse: int
> fs/nfs/getroot.c:98:17: sparse: sparse: incompatible types in conditional expression (different base types):
> fs/nfs/getroot.c:98:17: sparse: void
> fs/nfs/getroot.c:98:17: sparse: int
> fs/nfs/getroot.c:114:17: sparse: sparse: incompatible types in conditional expression (different base types):
> fs/nfs/getroot.c:114:17: sparse: void
> fs/nfs/getroot.c:114:17: sparse: int
> --
>>> fs/nfs/namespace.c:304:17: sparse: sparse: incompatible types in conditional expression (different base types):
> fs/nfs/namespace.c:304:17: sparse: void
> fs/nfs/namespace.c:304:17: sparse: int
> --
>>> fs/nfs/fs_context.c:1120:9: sparse: sparse: incompatible types in conditional expression (different base types):
> fs/nfs/fs_context.c:1120:9: sparse: void
> fs/nfs/fs_context.c:1120:9: sparse: int
> fs/nfs/fs_context.c:1123:9: sparse: sparse: incompatible types in conditional expression (different base types):
> fs/nfs/fs_context.c:1123:9: sparse: void
> fs/nfs/fs_context.c:1123:9: sparse: int
> fs/nfs/fs_context.c:1126:9: sparse: sparse: incompatible types in conditional expression (different base types):
> fs/nfs/fs_context.c:1126:9: sparse: void
> fs/nfs/fs_context.c:1126:9: sparse: int
> fs/nfs/fs_context.c:1591:9: sparse: sparse: incompatible types in conditional expression (different base types):
> fs/nfs/fs_context.c:1591:9: sparse: void
> fs/nfs/fs_context.c:1591:9: sparse: int
> fs/nfs/fs_context.c:1605:9: sparse: sparse: incompatible types in conditional expression (different base types):
> fs/nfs/fs_context.c:1605:9: sparse: void
> fs/nfs/fs_context.c:1605:9: sparse: int
> --
> fs/nfs/super.c:1170:49: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct rpc_xprt *xprt1 @@ got struct rpc_xprt [noderef] __rcu *cl_xprt @@
> fs/nfs/super.c:1170:49: sparse: expected struct rpc_xprt *xprt1
> fs/nfs/super.c:1170:49: sparse: got struct rpc_xprt [noderef] __rcu *cl_xprt
> fs/nfs/super.c:1171:49: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct rpc_xprt *xprt2 @@ got struct rpc_xprt [noderef] __rcu *cl_xprt @@
> fs/nfs/super.c:1171:49: sparse: expected struct rpc_xprt *xprt2
> fs/nfs/super.c:1171:49: sparse: got struct rpc_xprt [noderef] __rcu *cl_xprt
>>> fs/nfs/super.c:1307:17: sparse: sparse: incompatible types in conditional expression (different base types):
> fs/nfs/super.c:1307:17: sparse: void
> fs/nfs/super.c:1307:17: sparse: int
> fs/nfs/super.c:1333:17: sparse: sparse: incompatible types in conditional expression (different base types):
> fs/nfs/super.c:1333:17: sparse: void
> fs/nfs/super.c:1333:17: sparse: int
Andy, do you plan to have a look at this sparse splat?


--
Chuck Lever