[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <172258372520.2215.2625975190952358820.tip-bot2@tip-bot2>
Date: Fri, 02 Aug 2024 07:28:45 -0000
From: "tip-bot2 for Ahmed S. Darwish" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: "Ahmed S. Darwish" <darwi@...utronix.de>,
Thomas Gleixner <tglx@...utronix.de>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: x86/misc] tools/x86/kcpuid: Strip bitfield names
leading/trailing whitespace
The following commit has been merged into the x86/misc branch of tip:
Commit-ID: 9ecbc60a5ede928abdd2b152d828ae0ea8a1e3ed
Gitweb: https://git.kernel.org/tip/9ecbc60a5ede928abdd2b152d828ae0ea8a1e3ed
Author: Ahmed S. Darwish <darwi@...utronix.de>
AuthorDate: Thu, 18 Jul 2024 15:47:45 +02:00
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitterDate: Fri, 02 Aug 2024 09:17:19 +02:00
tools/x86/kcpuid: Strip bitfield names leading/trailing whitespace
While parsing and saving bitfield names from the CSV file, an extra
leading space is copied verbatim. That extra space is not a big issue
now, but further commits will add a new CSV file with much more padding
for the bitfield's name column.
Strip leading/trailing whitespaces while saving bitfield names.
Signed-off-by: Ahmed S. Darwish <darwi@...utronix.de>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Link: https://lore.kernel.org/all/20240718134755.378115-6-darwi@linutronix.de
---
tools/arch/x86/kcpuid/kcpuid.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/arch/x86/kcpuid/kcpuid.c b/tools/arch/x86/kcpuid/kcpuid.c
index 581d28c..c4f0ace 100644
--- a/tools/arch/x86/kcpuid/kcpuid.c
+++ b/tools/arch/x86/kcpuid/kcpuid.c
@@ -379,7 +379,7 @@ static int parse_line(char *line)
if (start)
bdesc->start = strtoul(start, NULL, 0);
- strcpy(bdesc->simp, tokens[4]);
+ strcpy(bdesc->simp, strtok(tokens[4], " \t"));
strcpy(bdesc->detail, tokens[5]);
return 0;
Powered by blists - more mailing lists