Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261440AbVDDVaB (ORCPT ); Mon, 4 Apr 2005 17:30:01 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261400AbVDDVPF (ORCPT ); Mon, 4 Apr 2005 17:15:05 -0400 Received: from e35.co.us.ibm.com ([32.97.110.133]:51187 "EHLO e35.co.us.ibm.com") by vger.kernel.org with ESMTP id S261406AbVDDVNp (ORCPT ); Mon, 4 Apr 2005 17:13:45 -0400 Date: Mon, 4 Apr 2005 14:13:36 -0700 From: "Paul E. McKenney" To: Arnd Bergmann Cc: Dipankar Sarma , linux-kernel@vger.kernel.org, shemminger@osdl.org, manfred@colorfullife.com, bunk@stusta.de Subject: Re: [RFC,PATCH 2/4] Deprecate synchronize_kernel, GPL replacement Message-ID: <20050404211335.GF1297@us.ibm.com> Reply-To: paulmck@us.ibm.com References: <20050403062149.GA1656@us.ibm.com> <20050403085650.GA4563@in.ibm.com> <20050403185016.GB1481@us.ibm.com> <200504040026.52101.arnd@arndb.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <200504040026.52101.arnd@arndb.de> User-Agent: Mutt/1.4.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1870 Lines: 45 On Mon, Apr 04, 2005 at 12:26:50AM +0200, Arnd Bergmann wrote: > On S?nndag 03 April 2005 20:50, Paul E. McKenney wrote: > > I couldn't find any way to suppress the "deprecated" warning that is > > generated by the "&sym" in the last line of the __EXPORT_SYMBOL() > > macro. ?Anyone know a way of doing this? ?There doesn't seem to me > > to be any point to giving the warning on the EXPORT_SYMBOL() -- and > > it does clutter up compiler output with useless "deprecated" warnings. > > You can define an inline function that is marked __deprecated and calls > the exported function: > > extern void __synchronize_kernel(void); > static inline __deprecated synchronize_kernel(void) > { > __synchronize_kernel(); > } > === > void __synchronize_kernel(void) > { > synchronize_rcu(); > } > EXPORT_SYMBOL(__synchronize_kernel); Cute! This would indeed deprecate synchronize_kernel() everywhere, while at the same time avoiding a "deprecated" warning on any EXPORT_SYMBOL(). However, it would provide a new symbol, __synchronize_kernel(), that could be called from any module, but with no "deprecated" warning. > You could even make __synchronize_kernel() static to let it only be used > by modules, but that might create some confusion about the interface. -That- is an interesting trick! Thinking about this more, it seems like getting the warning in modules but not in mainline is OK. If uses creep into the mainline, we can always just change them when they are noticed. In the worst case, it is still easy to simply update them when we remove synchronize_kernel() next April, right? Thanx, Paul - 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/