Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932232AbbERWEP (ORCPT ); Mon, 18 May 2015 18:04:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41336 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754732AbbERWEN (ORCPT ); Mon, 18 May 2015 18:04:13 -0400 Message-ID: <555A61DB.90608@redhat.com> Date: Mon, 18 May 2015 18:04:11 -0400 From: Prarit Bhargava User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131028 Thunderbird/17.0.10 MIME-Version: 1.0 To: "H. Peter Anvin" CC: Borislav Petkov , Brian Gerst , Linux Kernel Mailing List , Thomas Gleixner , Ingo Molnar , the arch/x86 maintainers , Andy Lutomirski , Denys Vlasenko , Dave Hansen , Peter P Waskiewicz Jr , Igor Mammedov , Fenghua Yu Subject: Re: [PATCH] x86, cpuinfo fix cpu_data(0) x86_model_id field truncation References: <1431973260-24617-1-git-send-email-prarit@redhat.com> <20150518194538.GD23618@pd.tnic> <20150518203600.GH23618@pd.tnic> <555A5165.8020500@zytor.com> In-Reply-To: <555A5165.8020500@zytor.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 970 Lines: 31 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 > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/