Markus Elfring
2024-Jul-15 11:48 UTC
[PATCH] drm/nouveau/debugfs: Simplify character output in nouveau_debugfs_vbios_image()
From: Markus Elfring <elfring at 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 at wanadoo.fr> Signed-off-by: Markus Elfring <elfring at 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
Ilia Mirkin
2024-Jul-15 13:15 UTC
[PATCH] drm/nouveau/debugfs: Simplify character output in nouveau_debugfs_vbios_image()
On Mon, Jul 15, 2024 at 7:49?AM Markus Elfring <Markus.Elfring at web.de> wrote:> > From: Markus Elfring <elfring at 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 at wanadoo.fr> > Signed-off-by: Markus Elfring <elfring at 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]);Is there some reason this whole thing isn't just seq_write(m, drm->vbios.data, drm->vbios.length)> return 0; > } > > -- > 2.45.2 >
Seemingly Similar Threads
- [PATCH] drm/nouveau/debugfs: Simplify character output in nouveau_debugfs_vbios_image()
- [PATCH] drm/nouveau/debugfs: Simplify character output in nouveau_debugfs_vbios_image()
- [PATCH] drm/nouveau/debugfs: Simplify character output in nouveau_debugfs_vbios_image()
- [PATCH 0/9] GPU-DRM-nouveau: Adjustments for seven function implementations
- [PATCH 3/9] drm/nouveau/debugfs: Use seq_putc() in nouveau_debugfs_pstate_get()