[PATCH] block: partitions: Use seq_buf_putc() in cmdline_partition()

Markus Elfring <[email protected]> Thu, 25 Jun 2026 10:08:01 +0200
Newsgroups org.kernel.vger.kernel-janitors,org.kernel.vger.linux-block,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
From: Markus Elfring <[email protected]>
Date: Thu, 25 Jun 2026 09:50:33 +0200

A single line break should be put into a sequence buffer.
Thus use the corresponding function “seq_buf_putc”.

The source code was transformed by using the Coccinelle software.

Signed-off-by: Markus Elfring <[email protected]>
---

All affected source code places could be adjusted at once
if the change acceptance would evolve accordingly.

18 source files are left over for similar development considerations.


 block/partitions/cmdline.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/block/partitions/cmdline.c b/block/partitions/cmdline.c
index 4fd52ed154b4..ce7488b3d2db 100644
--- a/block/partitions/cmdline.c
+++ b/block/partitions/cmdline.c
@@ -376,8 +376,6 @@ int cmdline_partition(struct parsed_partitions *state)
 
 	cmdline_parts_set(parts, disk_size, state);
 	cmdline_parts_verifier(1, state);
-
-	seq_buf_puts(&state->pp_buf, "\n");
-
+	seq_buf_putc(&state->pp_buf, '\n');
 	return 1;
 }
-- 
2.54.0