Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe: Use IS_ENABLED() for config checks instead of defined()
@ 2025-11-27 17:06 Nitin Gote
  2025-11-27 17:36 ` ✓ CI.KUnit: success for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Nitin Gote @ 2025-11-27 17:06 UTC (permalink / raw)
  To: intel-xe; +Cc: piotr.piorkowski, Nitin Gote

Prefer IS_ENABLED() instead of defined() for checking whether
a kconfig option is enabled.

Signed-off-by: Nitin Gote <nitin.r.gote@intel.com>
---
 drivers/gpu/drm/xe/xe_vram.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_vram.c b/drivers/gpu/drm/xe/xe_vram.c
index 0a645e76e5fa..8fac1cc08dc9 100644
--- a/drivers/gpu/drm/xe/xe_vram.c
+++ b/drivers/gpu/drm/xe/xe_vram.c
@@ -325,7 +325,7 @@ struct xe_vram_region *xe_vram_region_alloc(struct xe_device *xe, u8 id, u32 pla
 	vram->xe = xe;
 	vram->id = id;
 	vram->placement = placement;
-#if defined(CONFIG_DRM_XE_PAGEMAP)
+#if IS_ENABLED(CONFIG_DRM_XE_PAGEMAP)
 	vram->migrate = xe->tiles[id].migrate;
 #endif
 	return vram;
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [PATCH] drm/xe: Use IS_ENABLED() for config checks instead of defined()
@ 2025-12-02  7:02 Nitin Gote
  2025-12-02 23:45 ` Lin, Shuicheng
  0 siblings, 1 reply; 8+ messages in thread
From: Nitin Gote @ 2025-12-02  7:02 UTC (permalink / raw)
  To: tejas.upadhyay, intel-xe, jani.nikula; +Cc: piotr.piorkowski, Nitin Gote

Prefer IS_ENABLED() instead of defined() for checking whether
a kconfig option is enabled. IS_ENABLED() evaluates both built-in (=y)
and modular (=m) configurations at compile time, while defined() only
tests symbol presence at preprocessing and can’t distinguish between
built-in, module, or unset states.

This is purely cosmetic – no functional changes.

CC: Piotr Piórkowski <piotr.piorkowski@intel.com>
Signed-off-by: Nitin Gote <nitin.r.gote@intel.com>
---
 drivers/gpu/drm/xe/xe_vram.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_vram.c b/drivers/gpu/drm/xe/xe_vram.c
index 0a645e76e5fa..8fac1cc08dc9 100644
--- a/drivers/gpu/drm/xe/xe_vram.c
+++ b/drivers/gpu/drm/xe/xe_vram.c
@@ -325,7 +325,7 @@ struct xe_vram_region *xe_vram_region_alloc(struct xe_device *xe, u8 id, u32 pla
 	vram->xe = xe;
 	vram->id = id;
 	vram->placement = placement;
-#if defined(CONFIG_DRM_XE_PAGEMAP)
+#if IS_ENABLED(CONFIG_DRM_XE_PAGEMAP)
 	vram->migrate = xe->tiles[id].migrate;
 #endif
 	return vram;
-- 
2.50.1


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

end of thread, other threads:[~2025-12-02 23:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-27 17:06 [PATCH] drm/xe: Use IS_ENABLED() for config checks instead of defined() Nitin Gote
2025-11-27 17:36 ` ✓ CI.KUnit: success for " Patchwork
2025-11-27 18:38 ` ✓ Xe.CI.BAT: " Patchwork
2025-11-27 20:17 ` ✗ Xe.CI.Full: failure " Patchwork
2025-12-01 11:50 ` [PATCH] " Upadhyay, Tejas
2025-12-01 13:55   ` Jani Nikula
  -- strict thread matches above, loose matches on Subject: below --
2025-12-02  7:02 Nitin Gote
2025-12-02 23:45 ` Lin, Shuicheng

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