Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756006Ab0DNPMp (ORCPT ); Wed, 14 Apr 2010 11:12:45 -0400 Received: from ey-out-2122.google.com ([74.125.78.24]:35809 "EHLO ey-out-2122.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755074Ab0DNPMm convert rfc822-to-8bit (ORCPT ); Wed, 14 Apr 2010 11:12:42 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:content-transfer-encoding; b=Z17dJCpzme5AVEoVWih7Sf4Lc0RvfWGXQRG22bv/sfyK38e+7GLFWRH9v1NwYe7c5O 2LtCU+Bt+IXJhqcgzyflg1wljqKstU+g/ISIG3xwBTd2L7RqbewgsK1mGO3S5D5z2Qje 0WOzF5we3X9+yntt7lievn0mN/H2pPLGEvKu4= MIME-Version: 1.0 Reply-To: kusmabite@gmail.com In-Reply-To: References: <1271147857-11604-1-git-send-email-imunsie@au.ibm.com> Date: Wed, 14 Apr 2010 17:12:40 +0200 Message-ID: Subject: Re: [tip:perf/core] perf: Fix endianness argument compatibility with OPT_BOOLEAN() and introduce OPT_INCR() From: Erik Faye-Lund To: mingo@redhat.com, acme@redhat.com, jkacur@redhat.com, a.p.zijlstra@chello.nl, rusty@rustcorp.com.au, efault@gmx.de, mitake@dcl.info.waseda.ac.jp, imunsie@au1.ibm.com, fweisbec@gmail.com, rostedt@goodmis.org, hirofumi@mail.parknet.co.jp, imunsie@au.ibm.com, tglx@linutronix.de, mhiramat@redhat.com, paulus@samba.org, hpa@zytor.com, linux-kernel@vger.kernel.org, anton@samba.org, tzanussi@gmail.com, arjan@linux.intel.com, lizf@cn.fujitsu.com, tfransosi@gmail.com, xiaoguangrong@cn.fujitsu.com, git@vger.kernel.org, amwang@redhat.com, davem@davemloft.net, jaswinderrajput@gmail.com, ebmunson@us.ibm.com, kosaki.motohiro@jp.fujitsu.com, mingo@elte.hu Cc: linux-tip-commits@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1870 Lines: 47 I'd just like to point out that I'm commenting from the Git pont-of-view, since this patch was CC'ed to the Git mailing-list. On Wed, Apr 14, 2010 at 11:36 AM, tip-bot for Ian Munsie wrote: > Commit-ID: ?c05556421742eb47f80301767653a4bcb19de9de > Gitweb: ? ? http://git.kernel.org/tip/c05556421742eb47f80301767653a4bcb19de9de > Author: ? ? Ian Munsie > AuthorDate: Tue, 13 Apr 2010 18:37:33 +1000 > Committer: ?Ingo Molnar > CommitDate: Wed, 14 Apr 2010 11:26:44 +0200 > > perf: Fix endianness argument compatibility with OPT_BOOLEAN() and introduce OPT_INCR() > > Parsing an option from the command line with OPT_BOOLEAN on a > bool data type would not work on a big-endian machine due to the > manner in which the boolean was being cast into an int and > incremented. We don't use C99 features like the "bool"-type in Git, so this shouldn't really be a problem in our end. > For example, running 'perf probe --list' on a > PowerPC machine would fail to properly set the list_events bool > and would therefore print out the usage information and > terminate. > I don't know what this 'perf'-thing is, but it sounds like it's some external client for the parse-options-API that uses OPT_BOOLEAN incorrectly. Looking at linux-next.git, it seems so. The code in tools/perf/ seems to use OPT_BOOLEAN with C99 bools, and it seems to have imported git's parse-options API (in commit 0780060124011b94af55830939c86cc0916be0f5, it seems). I'd suggest either fixing the call-sites to use int, or just keeping these changes in linux-next.git. -- Erik "kusma" Faye-Lund -- 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/