Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Reduce duplicate code for simple configfs attributes
@ 2026-12-02  0:23 Matt Roper
  2026-12-02  0:23 ` [PATCH 1/2] drm/xe/configfs: Reduce attribute getters/setters duplication via macros Matt Roper
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Matt Roper @ 2026-12-02  0:23 UTC (permalink / raw)
  To: intel-xe; +Cc: Rodrigo Vivi, Stuart Summers, Matt Roper

Many of our configfs attributes representing simple integer or boolean
values have nearly duplicate implementations, both for the getter/setter
filesystem callbacks, and for the general lookup functions which expose
the underlying values to the rest of the Xe driver.  We expect many more
"simple" configfs attributes to show up in the future, so let's move
some of the common boilerplate into macros that can generate the common
code in a consistent manner.  This will avoid minor behavioral
inconsistencies or copy/paste errors like we've had in the past that are
easy to overlook.

These patches are mostly just refactoring, but there is one slight
functional change introduced here --- the enable_vram_page_offline
attribute now prints out as 0/1 in the same manner as our other boolean
attributes, rather than breaking the pattern by printing yes/no strings.

Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
---
Matt Roper (2):
      drm/xe/configfs: Reduce attribute getters/setters duplication via macros
      drm/xe/configfs: Consolidate duplicated configfs lookup boilerplate

 drivers/gpu/drm/xe/xe_configfs.c | 318 +++++++++++----------------------------
 1 file changed, 85 insertions(+), 233 deletions(-)
---
base-commit: f41e77417fa4877273fbd673b967e0571e1421c6
change-id: 20261201-configfs_simplify-d0e2225be6b3

Best regards,
-- 
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-12-02 16:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-02  0:23 [PATCH 0/2] Reduce duplicate code for simple configfs attributes Matt Roper
2026-12-02  0:23 ` [PATCH 1/2] drm/xe/configfs: Reduce attribute getters/setters duplication via macros Matt Roper
2026-12-02  0:23 ` [PATCH 2/2] drm/xe/configfs: Consolidate duplicated configfs lookup boilerplate Matt Roper
2026-12-02  1:14 ` ✗ CI.checkpatch: warning for Reduce duplicate code for simple configfs attributes Patchwork
2026-12-02  1:17 ` ✓ CI.KUnit: success " Patchwork
2026-12-02  1:52 ` ✓ Xe.CI.BAT: " Patchwork
2026-12-02 16:30 ` [PATCH 0/2] " Summers, Stuart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox