Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756999AbYBIWIz (ORCPT ); Sat, 9 Feb 2008 17:08:55 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754555AbYBIWIr (ORCPT ); Sat, 9 Feb 2008 17:08:47 -0500 Received: from sovereign.computergmbh.de ([85.214.69.204]:33700 "EHLO sovereign.computergmbh.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753343AbYBIWIr (ORCPT ); Sat, 9 Feb 2008 17:08:47 -0500 Date: Sat, 9 Feb 2008 23:08:45 +0100 (CET) From: Jan Engelhardt To: Sam Ravnborg cc: Johannes Weiner , Linux Kernel Mailing List Subject: Re: [RFC] Sectionized printk data In-Reply-To: <20080204180753.GB16050@uranus.ravnborg.org> Message-ID: References: <87zlugsox9.fsf@saeurebad.de> <20080204180753.GB16050@uranus.ravnborg.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1348 Lines: 43 On Feb 4 2008 19:07, Sam Ravnborg wrote: >> The attached patch allows something along the lines: >> >> int __init some_function(void) >> { >> [...] >> pr_init(KERN_WARNING "failure %s in %s\n", ...); >> [...] >> } >> >> Another idea I had was to make printk a macro that figures out the >> section of the surrounding function and then moves the data >> automatically when it is a literal, but I couldn't find mechanisms that >> allow this. Anyone of you got an idea? >> >> What do you think in general? > >What is the rationale behind this? To drop strings that are only shown once anyway, such as: static int __init ebtables_init(void) { int ret; mutex_lock(&ebt_mutex); list_add(&ebt_standard_target.list, &ebt_targets); mutex_unlock(&ebt_mutex); if ((ret = nf_register_sockopt(&ebt_sockopts)) < 0) return ret; -> printk(KERN_INFO "Ebtables v2.0 registered\n"); return 0; } >If you say "saving memory" then please let us know with specific examples >in what area these savings will really pay off. -- 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/