The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	kernel-janitors@vger.kernel.org,
	Christophe Jaillet <christophe.jaillet@wanadoo.fr>,
	Daniel Vetter <daniel@ffwll.ch>,
	Danilo Krummrich <dakr@redhat.com>,
	David Airlie <airlied@gmail.com>,
	Karol Herbst <kherbst@redhat.com>, Lyude Paul <lyude@redhat.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] drm/nouveau/debugfs: Simplify character output in nouveau_debugfs_vbios_image()
Date: Mon, 15 Jul 2024 13:48:22 +0200	[thread overview]
Message-ID: <cb21950b-286b-4630-9052-cff9e7e56337@web.de> (raw)

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 15 Jul 2024 13:36:54 +0200

Single characters should be put into a sequence.
Thus use the corresponding function “seq_putc” for one selected call.

This issue was transformed by using the Coccinelle software.

Suggested-by: Christophe Jaillet <christophe.jaillet@wanadoo.fr>
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/gpu/drm/nouveau/nouveau_debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_debugfs.c b/drivers/gpu/drm/nouveau/nouveau_debugfs.c
index e83db051e851..931b62097366 100644
--- a/drivers/gpu/drm/nouveau/nouveau_debugfs.c
+++ b/drivers/gpu/drm/nouveau/nouveau_debugfs.c
@@ -42,7 +42,7 @@ nouveau_debugfs_vbios_image(struct seq_file *m, void *data)
 	int i;

 	for (i = 0; i < drm->vbios.length; i++)
-		seq_printf(m, "%c", drm->vbios.data[i]);
+		seq_putc(m, drm->vbios.data[i]);
 	return 0;
 }

--
2.45.2


             reply	other threads:[~2024-07-15 11:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-15 11:48 Markus Elfring [this message]
2024-07-15 13:15 ` [PATCH] drm/nouveau/debugfs: Simplify character output in nouveau_debugfs_vbios_image() Ilia Mirkin
2024-07-23 16:23   ` [PATCH v2] drm/nouveau/debugfs: Optimise data " Markus Elfring
2024-07-23 16:57   ` [PATCH] drm/nouveau/debugfs: Simplify character " Christophe JAILLET
2024-07-23 17:03     ` Ilia Mirkin
2024-07-24  9:30     ` Markus Elfring

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=cb21950b-286b-4630-9052-cff9e7e56337@web.de \
    --to=markus.elfring@web.de \
    --cc=airlied@gmail.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=dakr@redhat.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kherbst@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lyude@redhat.com \
    --cc=nouveau@lists.freedesktop.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox