* [PATCH] RDMA/core: remove extraneous dummy helper functions
@ 2026-05-19 20:36 Arnd Bergmann
2026-05-19 22:52 ` Jason Gunthorpe
2026-05-20 9:35 ` kernel test robot
0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2026-05-19 20:36 UTC (permalink / raw)
To: Jason Gunthorpe, Leon Romanovsky
Cc: Arnd Bergmann, Sriharsha Basavapatna, linux-rdma, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
The _ib_copy_validate_udata_in() and _ib_respond_udata() functions
are now defined unconditionally, but there is still a dummy helper
definition for them when CONFIG_INFINIBAND_USER_ACCESS is disabled,
leading to a build failure:
drivers/infiniband/core/ib_core_uverbs.c:433:5: error: redefinition of '_ib_copy_validate_udata_in'
433 | int _ib_copy_validate_udata_in(struct ib_udata *udata, void *req,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/rdma/uverbs_std_types.h:10,
from drivers/infiniband/core/uverbs.h:49,
from drivers/infiniband/core/ib_core_uverbs.c:10:
include/rdma/uverbs_ioctl.h:961:19: note: previous definition of '_ib_copy_validate_udata_in' with type 'int(struct ib_udata *, void *, size_t, size_t)' {aka 'int(struct ib_udata *, void *, long unsigned int, long unsigned int)'}
961 | static inline int _ib_copy_validate_udata_in(struct ib_udata *udata, void *req,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/infiniband/core/ib_core_uverbs.c:483:5: error: redefinition of '_ib_respond_udata'
483 | int _ib_respond_udata(struct ib_udata *udata, const void *src, size_t len)
| ^~~~~~~~~~~~~~~~~
include/rdma/uverbs_ioctl.h:968:19: note: previous definition of '_ib_respond_udata' with type 'int(struct ib_udata *, const void *, size_t)' {aka 'int(struct ib_udata *, const void *, long unsigned int)'}
968 | static inline int _ib_respond_udata(struct ib_udata *udata, const void *src,
| ^~~~~~~~~~~~~~~~~
Remove the now incorrect dummy helpers and move the declarations
out of the #ifdef block.
Fixes: 65b044cee9fb ("RDMA/core: Move the _ib_copy_validate_udata* functions to ib_core_uverbs")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
include/rdma/uverbs_ioctl.h | 20 ++++----------------
1 file changed, 4 insertions(+), 16 deletions(-)
diff --git a/include/rdma/uverbs_ioctl.h b/include/rdma/uverbs_ioctl.h
index e2af17da3e32..bcca58ee0171 100644
--- a/include/rdma/uverbs_ioctl.h
+++ b/include/rdma/uverbs_ioctl.h
@@ -856,6 +856,10 @@ ib_uverbs_get_ucontext(const struct uverbs_attr_bundle *attrs)
return ib_uverbs_get_ucontext_file(attrs->ufile);
}
+int _ib_copy_validate_udata_in(struct ib_udata *udata, void *req,
+ size_t kernel_size, size_t minimum_size);
+int _ib_respond_udata(struct ib_udata *udata, const void *src, size_t len);
+
#if IS_ENABLED(CONFIG_INFINIBAND_USER_ACCESS)
int uverbs_get_flags64(u64 *to, const struct uverbs_attr_bundle *attrs_bundle,
size_t idx, u64 allowed_bits);
@@ -898,9 +902,6 @@ int _uverbs_get_const_unsigned(u64 *to,
int uverbs_copy_to_struct_or_zero(const struct uverbs_attr_bundle *bundle,
size_t idx, const void *from, size_t size);
-int _ib_copy_validate_udata_in(struct ib_udata *udata, void *req,
- size_t kernel_size, size_t minimum_size);
-int _ib_respond_udata(struct ib_udata *udata, const void *src, size_t len);
#else
static inline int
uverbs_get_flags64(u64 *to, const struct uverbs_attr_bundle *attrs_bundle,
@@ -957,19 +958,6 @@ _uverbs_get_const_unsigned(u64 *to,
{
return -EINVAL;
}
-
-static inline int _ib_copy_validate_udata_in(struct ib_udata *udata, void *req,
- size_t kernel_size,
- size_t minimum_size)
-{
- return -EINVAL;
-}
-
-static inline int _ib_respond_udata(struct ib_udata *udata, const void *src,
- size_t len)
-{
- return -EINVAL;
-}
#endif
#define uverbs_get_const_signed(_to, _attrs_bundle, _idx) \
--
2.39.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] RDMA/core: remove extraneous dummy helper functions
2026-05-19 20:36 [PATCH] RDMA/core: remove extraneous dummy helper functions Arnd Bergmann
@ 2026-05-19 22:52 ` Jason Gunthorpe
2026-05-20 9:35 ` kernel test robot
1 sibling, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2026-05-19 22:52 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Leon Romanovsky, Arnd Bergmann, Sriharsha Basavapatna, linux-rdma,
linux-kernel
On Tue, May 19, 2026 at 10:36:22PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> The _ib_copy_validate_udata_in() and _ib_respond_udata() functions
> are now defined unconditionally, but there is still a dummy helper
> definition for them when CONFIG_INFINIBAND_USER_ACCESS is disabled,
> leading to a build failure:
Thanks Arnd, Nathan beat you to it:
https://lore.kernel.org/all/20260519224911.GP7702@ziepe.ca/
Jason
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] RDMA/core: remove extraneous dummy helper functions
2026-05-19 20:36 [PATCH] RDMA/core: remove extraneous dummy helper functions Arnd Bergmann
2026-05-19 22:52 ` Jason Gunthorpe
@ 2026-05-20 9:35 ` kernel test robot
1 sibling, 0 replies; 3+ messages in thread
From: kernel test robot @ 2026-05-20 9:35 UTC (permalink / raw)
To: Arnd Bergmann, Jason Gunthorpe, Leon Romanovsky
Cc: llvm, oe-kbuild-all, Arnd Bergmann, Sriharsha Basavapatna,
linux-rdma, linux-kernel
Hi Arnd,
kernel test robot noticed the following build errors:
[auto build test ERROR on v7.1-rc4]
[also build test ERROR on linus/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Arnd-Bergmann/RDMA-core-remove-extraneous-dummy-helper-functions/20260520-044317
base: v7.1-rc4
patch link: https://lore.kernel.org/r/20260519203629.1341667-1-arnd%40kernel.org
patch subject: [PATCH] RDMA/core: remove extraneous dummy helper functions
config: hexagon-randconfig-002-20260520 (https://download.01.org/0day-ci/archive/20260520/202605201724.StvoCZ6d-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 5bac06718f502014fade905512f1d26d578a18f3)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260520/202605201724.StvoCZ6d-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/202605201724.StvoCZ6d-lkp@intel.com/
All errors (new ones prefixed by >>):
>> ld.lld: error: undefined symbol: _ib_copy_validate_udata_in
>>> referenced by siw_verbs.c:1373 (drivers/infiniband/sw/siw/siw_verbs.c:1373)
>>> drivers/infiniband/sw/siw/siw_verbs.o:(siw_reg_user_mr) in archive vmlinux.a
>>> referenced by siw_verbs.c:1373 (drivers/infiniband/sw/siw/siw_verbs.c:1373)
>>> drivers/infiniband/sw/siw/siw_verbs.o:(siw_reg_user_mr) in archive vmlinux.a
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for MFD_STMFX
Depends on [n]: HAS_IOMEM [=y] && I2C [=y] && OF [=n]
Selected by [y]:
- PINCTRL_STMFX [=y] && PINCTRL [=y] && I2C [=y] && HAS_IOMEM [=y]
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-05-20 9:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-19 20:36 [PATCH] RDMA/core: remove extraneous dummy helper functions Arnd Bergmann
2026-05-19 22:52 ` Jason Gunthorpe
2026-05-20 9:35 ` kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox