Skip to contentSkip to conversation

kernel-panic-return-early-from-print_tainted-when-not-tainted.patch removed from -mm tree

merged mm-nonmm-stable Andrew Morton 1 participant 1 message Jun 25, 2024

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: kernel/panic: return early from print_tainted() when not tainted
has been removed from the -mm tree. Its filename was
kernel-panic-return-early-from-print_tainted-when-not-tainted.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: Jani Nikula <[email protected]>
Subject: kernel/panic: return early from print_tainted() when not tainted
Date: Fri, 31 May 2024 12:04:54 +0300

Reduce indent to make follow-up changes slightly easier on the eyes.

---

 kernel/panic.c |   25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)
kernel/panic.c renamed from kernel/panic.c~kernel-panic-return-early-from-print_tainted-when-not-tainted +13 -12
@@ -507,22 +507,23 @@ const struct taint_flag taint_flags[TAIN
 const char *print_tainted(void)
 {
 	static char buf[TAINT_FLAGS_COUNT + sizeof("Tainted: ")];
+	char *s;
+	int i;
 
 	BUILD_BUG_ON(ARRAY_SIZE(taint_flags) != TAINT_FLAGS_COUNT);
 
-	if (tainted_mask) {
-		char *s;
-		int i;
-
-		s = buf + sprintf(buf, "Tainted: ");
-		for (i = 0; i < TAINT_FLAGS_COUNT; i++) {
-			const struct taint_flag *t = &taint_flags[i];
-			*s++ = test_bit(i, &tainted_mask) ?
-					t->c_true : t->c_false;
-		}
-		*s = 0;
-	} else
+	if (!tainted_mask) {
 		snprintf(buf, sizeof(buf), "Not tainted");
+		return buf;
+	}
+
+	s = buf + sprintf(buf, "Tainted: ");
+	for (i = 0; i < TAINT_FLAGS_COUNT; i++) {
+		const struct taint_flag *t = &taint_flags[i];
+		*s++ = test_bit(i, &tainted_mask) ?
+			t->c_true : t->c_false;
+	}
+	*s = 0;
 
 	return buf;
 }

_

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