Re: [PATCH v3] fwctl/cxl: Fix uuid_t usage in uapi

From: Jason Gunthorpe
Date: Fri Apr 11 2025 - 19:48:18 EST


On Thu, Apr 10, 2025 at 11:27:40AM -0700, Dan Williams wrote:
> The uuid_t type is kernel internal, and Paul reports the following build
> error when it is used in a uapi header:
>
> usr/include/cxl/features.h:59:9: error: unknown type name ‘uuid_t’
>
> Create a uuid type (__uapi_uuid_t) compatible with the longstanding
> definition uuid/uuid.h for userspace builds, and use uuid_t directly for
> kernel builds.
>
> Suggested-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
> Reported-by: "Paul E. McKenney" <paulmck@xxxxxxxxxx>
> Closes: http://lore.kernel.org/f6489337-67c7-48c8-b48a-58603ec15328@paulmck-laptop
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Closes: https://lore.kernel.org/oe-kbuild-all/202504050434.Eb4vugh5-lkp@xxxxxxxxx/
> Fixes: 9b8e73cdb141 ("cxl: Move cxl feature command structs to user header")
> Signed-off-by: Dan Williams <dan.j.williams@xxxxxxxxx>
> ---
> Changes since v2:
> * Drop the tinkering with __align_of__ and just document the safety
> rules (Jason)
>
> include/uapi/cxl/features.h | 21 +++++++++++++++------
> 1 file changed, 15 insertions(+), 6 deletions(-)

Applied thanks

Jason