Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756851AbXL3N2j (ORCPT ); Sun, 30 Dec 2007 08:28:39 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752208AbXL3N2b (ORCPT ); Sun, 30 Dec 2007 08:28:31 -0500 Received: from mx3.mail.elte.hu ([157.181.1.138]:58268 "EHLO mx3.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752198AbXL3N2a (ORCPT ); Sun, 30 Dec 2007 08:28:30 -0500 Date: Sun, 30 Dec 2007 14:19:10 +0100 From: Ingo Molnar To: Masami Hiramatsu Cc: "H. Peter Anvin" , Harvey Harrison , Ananth N Mavinakayanahalli , Jim Keniston , LKML , Thomas Gleixner Subject: Re: [PATCH] x86: Introduce REX prefix helper for kprobes Message-ID: <20071230131910.GE16946@elte.hu> References: <1198466795.6323.12.camel@brick> <47773C2D.8070600@redhat.com> <47774314.9080406@zytor.com> <47775062.4070300@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47775062.4070300@redhat.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-ELTE-VirusStatus: clean X-ELTE-SpamScore: -1.5 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=-1.5 required=5.9 tests=BAYES_00 autolearn=no SpamAssassin version=3.2.3 -1.5 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1120 Lines: 25 * Masami Hiramatsu wrote: > > Why is a macro better than an inline, and why the odd mIXed case? > > I thought we can use macro because it just check a bit mask. And if we > use this as a macro, it will be defined in #ifdef block at the top of > kprobes.c. It is simple in this case. I know the inline is better than > the macro, it can check the type of arguments. If you would like to > use inline, how about this? yes, we prefer inlines for just about everything. We have reoccuring regressions due to macro side-effects, lack of type and argument checking - and the simplest maintenance policy is to just never introduce new macros. Macros also played an active role in creating our current include file dependencies spaghetti. So unless there are very, very strong reasons in favor of adding a macro, please always use inlines. Ingo -- 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/