Skip to contentSkip to conversation

init-simplify-early_hostname.patch removed from -mm tree

merged mm-nonmm-stable Andrew Morton 1 participant 1 message Oct 7

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: init: simplify early_hostname()
has been removed from the -mm tree. Its filename was
init-simplify-early_hostname.patch

This patch was dropped because it was merged into the mm-nonmm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Thorsten Blum <[email protected]>
Subject: init: simplify early_hostname()
Date: Fri, 28 Aug 2026 19:43:37 +0200

Inline the strscpy() check and remove the redundant arglen variable. Use %zu to format the unsigned maxlen argument and add a newline after the truncation warning.

---

 init/version.c |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
init/version.c renamed from init/version.c~init-simplify-early_hostname +3 -5
@@ -21,16 +21,14 @@ static int __init early_hostname(char *a
 {
 	size_t bufsize = sizeof(init_uts_ns.name.nodename);
 	size_t maxlen  = bufsize - 1;
-	ssize_t arglen;
 
 	if (!arg)
 		return -EINVAL;
 
-	arglen = strscpy(init_uts_ns.name.nodename, arg, bufsize);
-	if (arglen < 0) {
-		pr_warn("hostname parameter exceeds %zd characters and will be truncated",
+	if (strscpy(init_uts_ns.name.nodename, arg, bufsize) < 0)
+		pr_warn("hostname parameter exceeds %zu characters and will be truncated\n",
 			maxlen);
-	}
+
 	return 0;
 }
 early_param("hostname", early_hostname);

_

Patches currently in -mm which might be from [email protected] are