]> Git Repo - linux.git/commitdiff
x86/platform/uv: Remove spaces from OEM IDs
authorMike Travis <[email protected]>
Thu, 5 Nov 2020 22:27:40 +0000 (16:27 -0600)
committerThomas Gleixner <[email protected]>
Sat, 7 Nov 2020 10:17:39 +0000 (11:17 +0100)
Testing shows that trailing spaces caused problems with the OEM_ID and
the OEM_TABLE_ID.  One being that the OEM_ID would not string compare
correctly.  Another the OEM_ID and OEM_TABLE_ID would be concatenated
in the printout.  Remove any trailing spaces.

Fixes: 1e61f5a95f191 ("Add and decode Arch Type in UVsystab")
Signed-off-by: Mike Travis <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
arch/x86/kernel/apic/x2apic_uv_x.c

index a5794794ea59b7e240d54b52f9729fe2870dfa98..0f848d6dddc9ca1ca3f035c6a079b32bcbd33b86 100644 (file)
@@ -290,6 +290,9 @@ static void __init uv_stringify(int len, char *to, char *from)
 {
        /* Relies on 'to' being NULL chars so result will be NULL terminated */
        strncpy(to, from, len-1);
+
+       /* Trim trailing spaces */
+       (void)strim(to);
 }
 
 /* Find UV arch type entry in UVsystab */
This page took 0.061605 seconds and 4 git commands to generate.