All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/1] drm/i915/hotplug: Use DEFINE_SHOW_STORE_ATTRIBUTE() helper for debugfs
@ 2026-11-24 10:58 Andy Shevchenko
  2026-11-24 11:16 ` ✗ CI.KUnit: failure for series starting with [v1,1/1] " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Andy Shevchenko @ 2026-11-24 10:58 UTC (permalink / raw)
  To: Andy Shevchenko, intel-gfx, intel-xe, dri-devel
  Cc: Jani Nikula, Rodrigo Vivi, Joonas Lahtinen, Tvrtko Ursulin,
	David Airlie, Simona Vetter

Use DEFINE_SHOW_STORE_ATTRIBUTE() helper for read-write file to reduce some
duplicated code.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_hotplug.c | 32 ++------------------
 1 file changed, 2 insertions(+), 30 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_hotplug.c b/drivers/gpu/drm/i915/display/intel_hotplug.c
index d095eb13dc06..c47a7c9044e7 100644
--- a/drivers/gpu/drm/i915/display/intel_hotplug.c
+++ b/drivers/gpu/drm/i915/display/intel_hotplug.c
@@ -1246,20 +1246,7 @@ static ssize_t i915_hpd_storm_ctl_write(struct file *file,
 
 	return len;
 }
-
-static int i915_hpd_storm_ctl_open(struct inode *inode, struct file *file)
-{
-	return single_open(file, i915_hpd_storm_ctl_show, inode->i_private);
-}
-
-static const struct file_operations i915_hpd_storm_ctl_fops = {
-	.owner = THIS_MODULE,
-	.open = i915_hpd_storm_ctl_open,
-	.read = seq_read,
-	.llseek = seq_lseek,
-	.release = single_release,
-	.write = i915_hpd_storm_ctl_write
-};
+DEFINE_SHOW_STORE_ATTRIBUTE(i915_hpd_storm_ctl);
 
 static int i915_hpd_short_storm_ctl_show(struct seq_file *m, void *data)
 {
@@ -1271,13 +1258,6 @@ static int i915_hpd_short_storm_ctl_show(struct seq_file *m, void *data)
 	return 0;
 }
 
-static int
-i915_hpd_short_storm_ctl_open(struct inode *inode, struct file *file)
-{
-	return single_open(file, i915_hpd_short_storm_ctl_show,
-			   inode->i_private);
-}
-
 static ssize_t i915_hpd_short_storm_ctl_write(struct file *file,
 					      const char __user *ubuf,
 					      size_t len, loff_t *offp)
@@ -1324,15 +1304,7 @@ static ssize_t i915_hpd_short_storm_ctl_write(struct file *file,
 
 	return len;
 }
-
-static const struct file_operations i915_hpd_short_storm_ctl_fops = {
-	.owner = THIS_MODULE,
-	.open = i915_hpd_short_storm_ctl_open,
-	.read = seq_read,
-	.llseek = seq_lseek,
-	.release = single_release,
-	.write = i915_hpd_short_storm_ctl_write,
-};
+DEFINE_SHOW_STORE_ATTRIBUTE(i915_hpd_short_storm_ctl);
 
 void intel_hpd_debugfs_register(struct intel_display *display)
 {
-- 
2.50.1


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

end of thread, other threads:[~2026-11-24 14:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-24 10:58 [PATCH v1 1/1] drm/i915/hotplug: Use DEFINE_SHOW_STORE_ATTRIBUTE() helper for debugfs Andy Shevchenko
2026-11-24 11:16 ` ✗ CI.KUnit: failure for series starting with [v1,1/1] " Patchwork
2026-11-24 11:55 ` [PATCH v1 1/1] " Jani Nikula
2026-11-24 14:31 ` ✗ i915.CI.BAT: failure for series starting with [v1,1/1] " Patchwork

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.