diff options
author | Ahmed S. Darwish <darwi@linutronix.de> | 2024-07-18 15:47:45 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2024-08-02 09:17:19 +0200 |
commit | 9ecbc60a5ede928abdd2b152d828ae0ea8a1e3ed (patch) | |
tree | 9449886e40dd07f3c4891d74bf50cd75c40cc99a /tools/arch | |
parent | cf96ab1a966b87b09fdd9e8cc8357d2d00776a3a (diff) |
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@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20240718134755.378115-6-darwi@linutronix.de
Diffstat (limited to 'tools/arch')
-rw-r--r-- | tools/arch/x86/kcpuid/kcpuid.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/arch/x86/kcpuid/kcpuid.c b/tools/arch/x86/kcpuid/kcpuid.c index 581d28c861ee..c4f0ace5c9ff 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; |