From: Jani Nikula <jani.nikula@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
dri-devel@lists.freedesktop.org
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>,
Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
Tvrtko Ursulin <tursulin@ursulin.net>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>
Subject: Re: [PATCH v1 1/1] drm/i915/hotplug: Use DEFINE_SHOW_STORE_ATTRIBUTE() helper for debugfs
Date: Tue, 24 Nov 2026 13:55:46 +0200 [thread overview]
Message-ID: <d464e5f329632fad52ab7ffb315a991e5fc03ec5@intel.com> (raw)
In-Reply-To: <20261124105805.617827-1-andriy.shevchenko@linux.intel.com>
On Tue, 24 Nov 2026, Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
> 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>
Reviewed-by: Jani Nikula <jani.nikula@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)
> {
--
Jani Nikula, Intel
next prev parent reply other threads:[~2026-11-24 11:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Jani Nikula [this message]
2026-11-24 14:31 ` ✗ i915.CI.BAT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d464e5f329632fad52ab7ffb315a991e5fc03ec5@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=airlied@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=joonas.lahtinen@linux.intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=simona@ffwll.ch \
--cc=tursulin@ursulin.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.