Message ID | 20240920104541.1899779-1-nitin.r.gote@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v1,1/1] drm/i915/gt: Use IS_ENABLED() instead of defined() on config check | expand |
Hi Nitin, On Fri, Sep 20, 2024 at 04:15:41PM +0530, Nitin Gote wrote: > Always prefer to use IS_ENABLED() instead of defined() for > checking whether a kconfig option is enabled or not. > > Signed-off-by: Nitin Gote <nitin.r.gote@intel.com> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Thanks, Andi
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c index 222c95f62156..e8a04e476c57 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c @@ -18,7 +18,7 @@ #define GUC_LOG_DEFAULT_CRASH_BUFFER_SIZE SZ_2M #define GUC_LOG_DEFAULT_DEBUG_BUFFER_SIZE SZ_16M #define GUC_LOG_DEFAULT_CAPTURE_BUFFER_SIZE SZ_1M -#elif defined(CONFIG_DRM_I915_DEBUG_GEM) +#elif IS_ENABLED(CONFIG_DRM_I915_DEBUG_GEM) #define GUC_LOG_DEFAULT_CRASH_BUFFER_SIZE SZ_1M #define GUC_LOG_DEFAULT_DEBUG_BUFFER_SIZE SZ_2M #define GUC_LOG_DEFAULT_CAPTURE_BUFFER_SIZE SZ_1M
Always prefer to use IS_ENABLED() instead of defined() for checking whether a kconfig option is enabled or not. Signed-off-by: Nitin Gote <nitin.r.gote@intel.com> --- drivers/gpu/drm/i915/gt/uc/intel_guc_log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)