Re: [PATCH 1/3] drm/amd/display: Simplify data output in psr_capability_show()
From: Markus Elfring
Date: Tue Jun 16 2026 - 03:20:07 EST
>> 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.
I obviously propose to omit a function call at this source code place
because an intended line break output can be achieved also with the subsequent function call.
Do you insist to preserve a similar statement here?
>>
>> - 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");
Regards,
Markus