Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754163AbYAEGng (ORCPT ); Sat, 5 Jan 2008 01:43:36 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752090AbYAEGn3 (ORCPT ); Sat, 5 Jan 2008 01:43:29 -0500 Received: from gw.goop.org ([64.81.55.164]:52649 "EHLO mail.goop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751686AbYAEGn2 (ORCPT ); Sat, 5 Jan 2008 01:43:28 -0500 Message-ID: <477F26DD.8080604@goop.org> Date: Fri, 04 Jan 2008 22:42:37 -0800 From: Jeremy Fitzhardinge User-Agent: Thunderbird 2.0.0.9 (X11/20071115) MIME-Version: 1.0 To: Ingo Molnar CC: Arjan van de Ven , linux-kernel@vger.kernel.org, Andrew Morton Subject: Re: [patch 1/3] move WARN_ON() out of line References: <477C32DA.5060905@linux.intel.com> <20080103092502.GA16096@elte.hu> In-Reply-To: <20080103092502.GA16096@elte.hu> X-Enigmail-Version: 0.95.5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 892 Lines: 25 Ingo Molnar wrote: > * Arjan van de Ven wrote: > > >> +#define WARN_ON(condition) do_warn_on((unsigned long)(condition), __FILE__, \ >> + __LINE__, __FUNCTION__) >> > > hm. This passes in 4 arguments to do_warn_on(). > > i think we could get away with no arguments (!), by using section > tricks. Firstly, we can get rid of __FUNCTION__ and replace it with a > ksyms lookup - that is fine enough. Secondly, we could put __FILE__ and > __LINE__ into a text section and key it up to the return address from > do_warn_on(). > BUG_ON already does this, and WARN_ON can reuse all the same machinery. J -- 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/