From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from accolon.hansenpartnership.com (accolon.hansenpartnership.com [76.243.235.52]) by ozlabs.org (Postfix) with ESMTP id 15720DDF5E for ; Thu, 4 Sep 2008 09:00:55 +1000 (EST) Subject: Re: [PATCH] Correct printk %pF to work on all architectures From: James Bottomley To: Linus Torvalds In-Reply-To: References: <1220473137.3254.29.camel@localhost.localdomain> <1220481754.3254.42.camel@localhost.localdomain> Content-Type: text/plain Date: Wed, 03 Sep 2008 18:00:53 -0500 Message-Id: <1220482853.3254.47.camel@localhost.localdomain> Mime-Version: 1.0 Cc: linux-arch@vger.kernel.org, linuxppc-dev@ozlabs.org, linux-ia64@vger.kernel.org, Parisc List List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Wed, 2008-09-03 at 15:54 -0700, Linus Torvalds wrote: > > Anyway, it's easy to do (if a slightly larger diff) ... I have to move > > the prototype from include/kernel.h to include/module.h because I need > > an assured asm/xxx include before it to get the override. > > I don't really see what this has to do with module.h, though. > > Why do this in ? Why not just do it in lib/vsptintf.c > which is the only place that cares? None of this needs to pollute the > generic header files that simply don't care. You want me to pull the elf header files into lib/vsprintf.c and have something like static inline void *dereference_function_descritpor(void *ptr) { #if defined(CONFIG_IA64) || defined(CONFIG_PPC64) void *p; if (!probe_kernel_address(ptr, p)) ptr = p; #elif defined(CONFIG_PARISC) && defined(CONFIG_64BITS) Elf64_Fptr *desc = ptr; void *p; if (!probe_kernel_address(&desc->addr, p)) ptr = p; #endif ... ? Because it just looks rather tacky ... James