Re: [PATCH 1/3] drm/amd/display: Simplify data output in psr_capability_show()
From: Alex Deucher
Date: Mon Jun 15 2026 - 13:55:56 EST
On Fri, Jun 5, 2026 at 7:49 AM Markus Elfring <Markus.Elfring@xxxxxx> wrote:
>
> From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
> Date: Fri, 5 Jun 2026 11:39:13 +0200
>
> Move the specification for a line break from a seq_puts() call
> to a seq_printf() call.
>
> The source code was transformed by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
> ---
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
> index 4b09a740f205..6e6f391b640e 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
> @@ -1076,9 +1076,9 @@ static int psr_capability_show(struct seq_file *m, void *data)
> seq_printf(m, "Sink support: %s", str_yes_no(link->dpcd_caps.psr_info.psr_version != 0));
> if (link->dpcd_caps.psr_info.psr_version)
> seq_printf(m, " [0x%02x]", link->dpcd_caps.psr_info.psr_version);
> - seq_puts(m, "\n");
Why not just convert this to seq_putc() and drop the rest? It seems
more logical from a code structure perspective.
Alex
>
> - seq_printf(m, "Driver support: %s", str_yes_no(link->psr_settings.psr_feature_enabled));
> + seq_printf(m, "\nDriver support: %s",
> + str_yes_no(link->psr_settings.psr_feature_enabled));
> if (link->psr_settings.psr_version)
> seq_printf(m, " [0x%02x]", link->psr_settings.psr_version);
> seq_puts(m, "\n");
> --
> 2.54.0
>