All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] gpu: i915: display: Replace define function
@ 2023-07-06  7:28 Minjie Du
  2023-07-06  8:13 ` Jani Nikula
  0 siblings, 1 reply; 2+ messages in thread
From: Minjie Du @ 2023-07-06  7:28 UTC (permalink / raw)
  To: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, Tvrtko Ursulin,
	David Airlie, Daniel Vetter, Minjie Du, Stephen Rothwell,
	open list:DRM DRIVERS, open list
  Cc: opensource.kernel

Replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE.

Signed-off-by: Minjie Du <duminjie@vivo.com>
---
 drivers/gpu/drm/i915/display/intel_psr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index 56c17283b..822858f3e 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -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");
 
-- 
2.39.0


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

* Re: [PATCH v1] gpu: i915: display: Replace define function
  2023-07-06  7:28 [PATCH v1] gpu: i915: display: Replace define function Minjie Du
@ 2023-07-06  8:13 ` Jani Nikula
  0 siblings, 0 replies; 2+ messages in thread
From: Jani Nikula @ 2023-07-06  8:13 UTC (permalink / raw)
  To: Minjie Du, Joonas Lahtinen, Rodrigo Vivi, Tvrtko Ursulin,
	David Airlie, Daniel Vetter, Minjie Du, Stephen Rothwell,
	open list:DRM DRIVERS, open list
  Cc: opensource.kernel

On Thu, 06 Jul 2023, Minjie Du <duminjie@vivo.com> wrote:
> 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.

>
> Signed-off-by: Minjie Du <duminjie@vivo.com>
> ---
>  drivers/gpu/drm/i915/display/intel_psr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
> index 56c17283b..822858f3e 100644
> --- a/drivers/gpu/drm/i915/display/intel_psr.c
> +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> @@ -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");

-- 
Jani Nikula, Intel Open Source Graphics Center

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

end of thread, other threads:[~2023-07-06  8:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-06  7:28 [PATCH v1] gpu: i915: display: Replace define function Minjie Du
2023-07-06  8:13 ` Jani Nikula

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.