[PATCH] Correct printk %pF to work on all architectures

Linus Torvalds torvalds at linux-foundation.org
Thu Sep 4 07:22:36 EST 2008



On Wed, 3 Sep 2008, James Bottomley wrote:
> 
> Make dereference_function_descriptor() more accommodating by allowing
> architecture overrides.

Don't do it like this.

We don't want some stupid useless weak function that is empty on all sane 
platforms.

Just do

	.. declare or create an inline 'parisc_function_descriptor()' ..

	#define dereference_function_descriptor(p) parisc_function_descriptor(p)

in some arch header file. And then use

	#ifndef dereference_function_descriptor
	#define dereference_function_descriptor(p) (p)
	#endif

in the generic code, so that sane architectures don't need to do anything 
at all.

		Linus



More information about the Linuxppc-dev mailing list