summaryrefslogtreecommitdiff
path: root/rust/uapi
diff options
context:
space:
mode:
authorMukesh Kumar Chaurasiya (IBM) <mkchauras@gmail.com>2026-08-11 12:03:45 +0530
committerMiguel Ojeda <ojeda@kernel.org>2026-08-11 11:34:06 +0200
commitcdfcaa36ac93aa96df8310d7e57860f7600b2861 (patch)
treee1ca12f6ee56f2ba76d0819c65494c270677e9ca /rust/uapi
parentd481d999967d4e7ebcecf472fc29b8f5dfcfcc29 (diff)
rust: uapi: replace direct asm-generic/ioctl.h include with linux/ioctl.h
rust/uapi/uapi_helper.h was directly including <uapi/asm-generic/ioctl.h> instead of the proper <uapi/linux/ioctl.h>. On powerpc, <uapi/linux/ioctl.h> pulls in <uapi/asm/ioctl.h> first, which defines _IOC_SIZEBITS, _IOC_DIRBITS, _IOC_NONE, and _IOC_WRITE with the arch-specific values, before falling through to <asm-generic/ioctl.h>. By bypassing that chain and including <asm-generic/ioctl.h> directly, the arch-specific overrides never ran first, so when other headers in the compilation later brought in the full arch-aware chain, Clang saw those four macros being defined a second time and emitted: clang diag: arch/powerpc/include/uapi/asm/ioctl.h:5:9: warning: '_IOC_SIZEBITS' macro redefined [-Wmacro-redefined] clang diag: arch/powerpc/include/uapi/asm/ioctl.h:6:9: warning: '_IOC_DIRBITS' macro redefined [-Wmacro-redefined] clang diag: arch/powerpc/include/uapi/asm/ioctl.h:8:9: warning: '_IOC_NONE' macro redefined [-Wmacro-redefined] clang diag: arch/powerpc/include/uapi/asm/ioctl.h:10:9: warning: '_IOC_WRITE' macro redefined [-Wmacro-redefined] Fix this by replacing the direct include of <uapi/asm-generic/ioctl.h> with <uapi/linux/ioctl.h>, which is the correct arch-aware entry point and already maintains the intended include order. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202608050618.9dekfjtF-lkp@intel.com/ Signed-off-by: Mukesh Kumar Chaurasiya (IBM) <mkchauras@gmail.com> Fixes: 4e1746656839 ("rust: uapi: Add UAPI crate") Link: https://patch.msgid.link/20260811063345.685884-1-mkchauras@gmail.com Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'rust/uapi')
-rw-r--r--rust/uapi/uapi_helper.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/rust/uapi/uapi_helper.h b/rust/uapi/uapi_helper.h
index 06d7d1a2e8da..1c4aa4292dce 100644
--- a/rust/uapi/uapi_helper.h
+++ b/rust/uapi/uapi_helper.h
@@ -6,11 +6,11 @@
* Sorted alphabetically.
*/
-#include <uapi/asm-generic/ioctl.h>
#include <uapi/drm/drm.h>
#include <uapi/drm/nova_drm.h>
#include <uapi/drm/panthor_drm.h>
#include <uapi/linux/android/binder.h>
+#include <uapi/linux/ioctl.h>
#include <uapi/linux/mdio.h>
#include <uapi/linux/mii.h>
#include <uapi/linux/ethtool.h>