All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Alex Deucher <alexdeucher@gmail.com>, amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Chenyu Chen" <chen-yu.chen@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	"David Airlie" <airlied@gmail.com>,
	"Harry Wentland" <harry.wentland@amd.com>,
	"Ivan Lipski" <ivan.lipski@amd.com>,
	"Kees Cook" <kees@kernel.org>, "Leo Li" <sunpeng.li@amd.com>,
	"Mario Limonciello" <mario.limonciello@amd.com>,
	"Ray Wu" <ray.wu@amd.com>,
	"Rodrigo Siqueira" <siqueira@igalia.com>,
	"Rong Zhang" <i@rong.moe>, "Simona Vetter" <simona@ffwll.ch>,
	"Timur Kristóf" <timur.kristof@gmail.com>,
	"Tom Chung" <chiahsuan.chung@amd.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] drm/amd/display: Simplify data output in psr_capability_show()
Date: Tue, 16 Jun 2026 09:19:21 +0200	[thread overview]
Message-ID: <1ed4140f-83b6-4393-a67d-ed321b72ecb2@web.de> (raw)
In-Reply-To: <CADnq5_P6aSFKefO+f3aofhfNh7kELEQWxid4EWgwAUr2saEh8Q@mail.gmail.com>

>> 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@users.sourceforge.net>
>> ---
>>  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

  reply	other threads:[~2026-06-16 12:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-05 11:30 [PATCH 0/3] drm/amd/display: More efficient data output in four functions Markus Elfring
2026-06-05 11:31 ` [PATCH 1/3] drm/amd/display: Simplify data output in psr_capability_show() Markus Elfring
2026-06-15 17:49   ` Alex Deucher
2026-06-16  7:19     ` Markus Elfring [this message]
2026-06-16 18:51       ` Alex Deucher
2026-06-05 11:32 ` [PATCH 2/3] drm/amd/display: Simplify data output in ips_status_show() Markus Elfring
2026-06-05 11:33 ` [PATCH 3/3] drm/amd/display: Use seq_putc() in three functions Markus Elfring
2026-06-15 17:53   ` Alex Deucher
2026-06-13 11:05 ` [PATCH 0/3] drm/amd/display: More efficient data output in four functions Timur Kristóf

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=1ed4140f-83b6-4393-a67d-ed321b72ecb2@web.de \
    --to=markus.elfring@web.de \
    --cc=airlied@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=alexdeucher@gmail.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=chen-yu.chen@amd.com \
    --cc=chiahsuan.chung@amd.com \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=i@rong.moe \
    --cc=ivan.lipski@amd.com \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=ray.wu@amd.com \
    --cc=simona@ffwll.ch \
    --cc=siqueira@igalia.com \
    --cc=sunpeng.li@amd.com \
    --cc=timur.kristof@gmail.com \
    /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.