linux-m68k.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] m68k: mm: Remove size argument when calling strscpy()
@ 2025-03-02 23:05 Thorsten Blum
  2025-03-06 17:41 ` Jean-Michel Hautbois
  2025-03-06 17:44 ` Geert Uytterhoeven
  0 siblings, 2 replies; 9+ messages in thread
From: Thorsten Blum @ 2025-03-02 23:05 UTC (permalink / raw)
  To: Geert Uytterhoeven, Jean-Michel Hautbois
  Cc: Thorsten Blum, linux-m68k, linux-kernel

The size parameter of strscpy() is optional and specifying the size of
the destination buffer is unnecessary. Remove it to simplify the code.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 arch/m68k/kernel/setup_mm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/m68k/kernel/setup_mm.c b/arch/m68k/kernel/setup_mm.c
index 48ce67947678..0fba32552836 100644
--- a/arch/m68k/kernel/setup_mm.c
+++ b/arch/m68k/kernel/setup_mm.c
@@ -147,8 +147,7 @@ static void __init m68k_parse_bootinfo(const struct bi_record *record)
 			break;
 
 		case BI_COMMAND_LINE:
-			strscpy(m68k_command_line, data,
-				sizeof(m68k_command_line));
+			strscpy(m68k_command_line, data);
 			break;
 
 		case BI_RNG_SEED: {
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-03-07  9:59 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-02 23:05 [PATCH] m68k: mm: Remove size argument when calling strscpy() Thorsten Blum
2025-03-06 17:41 ` Jean-Michel Hautbois
2025-03-06 17:44 ` Geert Uytterhoeven
2025-03-06 23:24   ` Finn Thain
2025-03-07  8:28     ` Geert Uytterhoeven
2025-03-07  8:58       ` Finn Thain
2025-03-07  9:28         ` Geert Uytterhoeven
2025-03-07  9:15     ` Thorsten Blum
2025-03-07  9:59       ` Finn Thain

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).