lkml.org 
[lkml]   [2015]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86, cpuinfo fix cpu_data(0) x86_model_id field truncation


On 05/18/2015 04:53 PM, H. Peter Anvin wrote:
> On 05/18/2015 01:36 PM, Borislav Petkov wrote:
>> On Mon, May 18, 2015 at 04:27:02PM -0400, Brian Gerst wrote:
>>> The problem here is that strim() modifies the string in place,
>>> replacing the first trailing space with a null. I think the best
>>> solution is to do the trimming in get_model_name(). It already trims
>>> leading spaces for Intel.
>>
>> Sounds good - start from the 48th position forward to the first non \s
>> char. Yeah.
>>
>
> Yes, we should trim both leading and trailing spaces.

Oh sorry, I missed this as it just landed in my mailbox. So a backward search
for the first non \s char.

I can do that and I'll nack my new patch.

P.

>
> -hpa
>


\
 
 \ /
  Last update: 2015-05-19 00:21    [W:0.265 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site