Skip to content

Commit

Permalink
x86/platform/uv: Remove spaces from OEM IDs
Browse files Browse the repository at this point in the history
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: 1e61f5a ("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]
  • Loading branch information
mike-travis authored and KAGA-KOKO committed Nov 7, 2020
1 parent 1aec69a commit 1aee505
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/x86/kernel/apic/x2apic_uv_x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 1aee505

Please sign in to comment.