Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757343AbXLGVlh (ORCPT ); Fri, 7 Dec 2007 16:41:37 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755056AbXLGVl2 (ORCPT ); Fri, 7 Dec 2007 16:41:28 -0500 Received: from mummy.ncsc.mil ([144.51.88.129]:34674 "EHLO mummy.ncsc.mil" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754739AbXLGVl1 (ORCPT ); Fri, 7 Dec 2007 16:41:27 -0500 Subject: Re: [PATCH] Fake NUMA emulation for PowerPC From: Dave Quigley To: Geert Uytterhoeven Cc: Balbir Singh , linuxppc-dev@ozlabs.org, LKML In-Reply-To: References: <20071207211425.10223.91240.sendpatchset@balbir-laptop> Content-Type: text/plain; charset=utf-8 Date: Fri, 07 Dec 2007 16:33:45 -0500 Message-Id: <1197063225.6078.54.camel@moss-terrapins.epoch.ncsc.mil> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 (2.12.1-3.fc8) Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1388 Lines: 38 On Fri, 2007-12-07 at 22:30 +0100, Geert Uytterhoeven wrote: > On Sat, 8 Dec 2007, Balbir Singh wrote: > > + if (strstr(p, "fake=")) > > + cmdline = p + 5; /* 5 is faster than strlen("fake=") */ > > Really? My gcc is smart enough to replace the `strlen("fake=")' by 5, even > without -O. If some odd reason it doesn't replace it wouldn't it be smarter to do sizeof("fake="); It should definitely optimize that away to a constant value and its less prone to error if the string in strstr changes. > > With kind regards, > > Geert Uytterhoeven > Software Architect > > Sony Network and Software Technology Center Europe > The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium > > Phone: +32 (0)2 700 8453 > Fax: +32 (0)2 700 8622 > E-mail: Geert.Uytterhoeven@sonycom.com > Internet: http://www.sony-europe.com/ > > Sony Network and Software Technology Center Europe > A division of Sony Service Centre (Europe) N.V. > Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium > VAT BE 0413.825.160 · RPR Brussels > Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619 -- 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/