Skip to content

drm/xe: Fix mismatched include guards in header files

Shuicheng Lin intel-xe 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5drm/xe: Add missing include guards to unprotected headersdrivers/gpu/drm/xe/xe_dep_scheduler.h drivers/gpu/drm/xe/xe_pcode_api.h+10 -01 reply
2/5drm/xe: Add missing _H to include guard suffixesdrivers/gpu/drm/xe/xe_migrate.h drivers/gpu/drm/xe/xe_pt_walk.h drivers/gpu/drm/xe/xe_reg_sr.h +7 more+20 -201 reply
3/5drm/xe: Add missing trailing underscore to include guardsdrivers/gpu/drm/xe/xe_guc_capture.h drivers/gpu/drm/xe/xe_guc_capture_types.h drivers/gpu/drm/xe/xe_guc_fwif.h +1 more+8 -81 reply
4/5drm/xe: Add missing leading underscore to include guardsdrivers/gpu/drm/xe/xe_drm_ras.h drivers/gpu/drm/xe/xe_hw_error.h+4 -41 reply
5/5drm/xe: Normalize double-underscore include guards to single-underscoredrivers/gpu/drm/xe/xe_eu_stall.h drivers/gpu/drm/xe/xe_nvm.h drivers/gpu/drm/xe/xe_pxp.h +3 more+16 -164 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchNitin Gote
1/5R-b
2/5R-b
3/5R-b
4/5R-b
5/5R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/5] drm/xe: Fix mismatched include guards in header files

Mostly generated by AI and reviewed to confirm the change is correct.

Audit and normalize include guards across 24 xe driver headers to follow the dominant _XE_<BASENAME>_H_ convention used by ~232 of ~260 xe headers.

The series is organized from most severe to least:

1. Add missing include guards to 2 completely unprotected headers (xe_dep_scheduler.h, xe_pcode_api.h) that could cause duplicate definition errors on multiple inclusion.
2. Add missing _H suffix to 10 headers using _XE_<NAME>_ guards.
3. Add missing trailing underscore to 4 headers using _XE_<NAME>_H.
4. Add missing leading underscore to 2 headers using XE_<NAME>_H_.
5. Normalize 6 headers from __XE_<NAME>_H__ double-underscore style to single-underscore, avoiding C reserved identifiers (C11 §7.1.3).

No functional changes. Compile-tested only.

Shuicheng Lin (5):
drm/xe: Add missing include guards to unprotected headers drm/xe: Add missing _H to include guard suffixes drm/xe: Add missing trailing underscore to include guards drm/xe: Add missing leading underscore to include guards drm/xe: Normalize double-underscore include guards to
single-underscore

 drivers/gpu/drm/xe/xe_dep_scheduler.h     | 5 +++++
 drivers/gpu/drm/xe/xe_drm_ras.h           | 4 ++--
 drivers/gpu/drm/xe/xe_eu_stall.h          | 4 ++--
 drivers/gpu/drm/xe/xe_guc_capture.h       | 4 ++--
 drivers/gpu/drm/xe/xe_guc_capture_types.h | 4 ++--
 drivers/gpu/drm/xe/xe_guc_fwif.h          | 4 ++--
 drivers/gpu/drm/xe/xe_hw_error.h          | 4 ++--
 drivers/gpu/drm/xe/xe_migrate.h           | 4 ++--
 drivers/gpu/drm/xe/xe_nvm.h               | 4 ++--
 drivers/gpu/drm/xe/xe_pcode_api.h         | 5 +++++
 drivers/gpu/drm/xe/xe_pt_walk.h           | 4 ++--
 drivers/gpu/drm/xe/xe_pxp.h               | 6 +++---
 drivers/gpu/drm/xe/xe_pxp_debugfs.h       | 6 +++---
 drivers/gpu/drm/xe/xe_pxp_submit.h        | 6 +++---
 drivers/gpu/drm/xe/xe_pxp_types.h         | 6 +++---
 drivers/gpu/drm/xe/xe_reg_sr.h            | 4 ++--
 drivers/gpu/drm/xe/xe_reg_sr_types.h      | 4 ++--
 drivers/gpu/drm/xe/xe_reg_whitelist.h     | 4 ++--
 drivers/gpu/drm/xe/xe_rtp.h               | 4 ++--
 drivers/gpu/drm/xe/xe_rtp_helpers.h       | 4 ++--
 drivers/gpu/drm/xe/xe_rtp_types.h         | 4 ++--
 drivers/gpu/drm/xe/xe_tuning.h            | 4 ++--
 drivers/gpu/drm/xe/xe_uc_fw_abi.h         | 4 ++--
 drivers/gpu/drm/xe/xe_wa.h                | 4 ++--
 24 files changed, 58 insertions(+), 48 deletions(-)
Signature · 1 line
2.43.0