Skip to contentSkip to conversation

gpu: i915: display: Replace define function

PATCH In review Minjie Du 2 participants 2 messages Jul 6, 2023

Subsystems (3)
lore
Share & tools
lore

Minjie Du

author
#0 lore raw

PATCH 1/1 gpu: i915: display: Replace define function

Replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE.

---
 drivers/gpu/drm/i915/display/intel_psr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_psr.c +1 -1
index 56c17283b..822858f3e 100644
@@ -2998,7 +2998,7 @@ i915_edp_psr_debug_get(void *data, u64 *val)
 	return -ENODEV;
 }
 
-DEFINE_SIMPLE_ATTRIBUTE(i915_edp_psr_debug_fops,
+DEFINE_DEBUGFS_ATTRIBUTE(i915_edp_psr_debug_fops,
 			i915_edp_psr_debug_get, i915_edp_psr_debug_set,
 			"%llu\n");
 
Signature · 1 line
2.39.0
maintainer
#1 lore raw
Quoted 1 line · Minjie Du

Replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE.

The subject prefix should be "drm/i915/psr: ". Please try git log on the file to see what is commonly used.

The subject should say what's being done. "Replace define function" is way too generic to be useful. Even "Prefer DEFINE_DEBUGFS_ATTRIBUTE" is better.

Finally, the commit message itself should say *why*. Why are we replacing DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE?

BR,
Jani.

Quoted 18 lines
---
 drivers/gpu/drm/i915/display/intel_psr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_psr.c +1 -1
index 56c17283b..822858f3e 100644
@@ -2998,7 +2998,7 @@ i915_edp_psr_debug_get(void *data, u64 *val)
 	return -ENODEV;
 }
 
-DEFINE_SIMPLE_ATTRIBUTE(i915_edp_psr_debug_fops,
+DEFINE_DEBUGFS_ATTRIBUTE(i915_edp_psr_debug_fops,
 			i915_edp_psr_debug_get, i915_edp_psr_debug_set,
 			"%llu\n");
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center