Skip to contentSkip to conversation

xen-netback: Use seq_putc() in xenvif_dump_hash_info()

PATCH In review Markus Elfring 3 participants 4 messages Jul 13, 2024 – Jul 15, 2024

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen-netback: Use seq_putc() in xenvif_dump_hash_info()

From: Markus Elfring <[email protected]>
Date: Sat, 13 Jul 2024 15:10:15 +0200

Single characters (line breaks) should be put into a sequence. Thus use the corresponding function “seq_putc”.

This issue was transformed by using the Coccinelle software.

---
 drivers/net/xen-netback/hash.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/xen-netback/hash.c +2 -2
index ff96f22648ef..2d77a7187e1e 100644
@@ -425,7 +425,7 @@ void xenvif_dump_hash_info(struct xenvif *vif, struct seq_file *m)
 		for (j = 0; j < n; j++, i++)
 			seq_printf(m, "%02x ", vif->hash.key[i]);
 
-		seq_puts(m, "\n");
+		seq_putc(m, '\n');
 	}
 
 	if (vif->hash.size != 0) {
@@ -445,7 +445,7 @@ void xenvif_dump_hash_info(struct xenvif *vif, struct seq_file *m)
 			for (j = 0; j < n; j++, i++)
 				seq_printf(m, "%4u ", mapping[i]);
 
-			seq_puts(m, "\n");
+			seq_putc(m, '\n');
 		}
 	}
 }

--
2.45.2

maintainer
#1 lore raw
Quoted 4 lines · On Sat, 13 Jul 2024 15:18:42 +0200 Markus Elfring wrote:

Single characters (line breaks) should be put into a sequence. Thus use the corresponding function “seq_putc”.

This issue was transformed by using the Coccinelle software.

I prefer to only merge trivial changes like this if maintainer indicates their support by acking them. Since the merge window has opened we can't wait and see so I'm marking this patch and your pktgen patch as deferred.

#2 lore raw

Le 15/07/2024 à 18:01, Jakub Kicinski a écrit :

Quoted 12 lines · On Sat, 13 Jul 2024 15:18:42 +0200 Markus Elfring wrote:
Quoted 4 lines

Single characters (line breaks) should be put into a sequence. Thus use the corresponding function “seq_putc”.

This issue was transformed by using the Coccinelle software.

I prefer to only merge trivial changes like this if maintainer indicates their support by acking them. Since the merge window has opened we can't wait and see so I'm marking this patch and your pktgen patch as deferred.

Hi Jakub,

Most of the time, this kind of modification is useless because it is already done by the compiler, see [1].

CJ

[1]: https://elixir.bootlin.com/linux/v6.10-rc7/source/include/linux/seq_file.h#L123

maintainer
#3 lore raw
Quoted 2 lines · On Mon, 15 Jul 2024 22:24:39 +0200 Christophe JAILLET wrote:

Most of the time, this kind of modification is useless because it is already done by the compiler, see [1].

GTK, thanks!