Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932920AbbERUgK (ORCPT ); Mon, 18 May 2015 16:36:10 -0400 Received: from mail.skyhub.de ([78.46.96.112]:50177 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932721AbbERUgI (ORCPT ); Mon, 18 May 2015 16:36:08 -0400 Date: Mon, 18 May 2015 22:36:00 +0200 From: Borislav Petkov To: Brian Gerst Cc: Prarit Bhargava , Linux Kernel Mailing List , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , 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 Message-ID: <20150518203600.GH23618@pd.tnic> References: <1431973260-24617-1-git-send-email-prarit@redhat.com> <20150518194538.GD23618@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 704 Lines: 20 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. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. -- -- 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/