]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iommufd: Put constants for all the uAPI enums
authorJason Gunthorpe <jgg@nvidia.com>
Fri, 12 Jul 2024 00:11:03 +0000 (21:11 -0300)
committerJason Gunthorpe <jgg@nvidia.com>
Mon, 15 Jul 2024 12:44:54 +0000 (09:44 -0300)
commit136a8066676e593cd29627219467fc222c8f3b04
tree1773779df02767f48a7f2c51fce7856e9219f4f4
parent595572aae3d0c3bf295ea759b74b948e7493a9ff
iommufd: Put constants for all the uAPI enums

Relying on position in the enum makes it subtly harder when doing merge
resolutions or backporting as it is easy to grab a patch and not notice it
is a uAPI change with a differently ordered enum. This may become a bigger
problem in next cycles when iommu_hwpt_invalidate_data_type and other
per-driver enums have patches flowing through different trees.

So lets start including constants for all the uAPI enums to make this
safer.

No functional change.

Link: https://lore.kernel.org/r/0-v1-2c06ec044924+133-iommufd_uapi_const_jgg@nvidia.com
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Yi Liu <yi.l.liu@intel.com>
Tested-by: Yi Liu <yi.l.liu@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
include/uapi/linux/iommufd.h