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

Linus Torvalds
2008-09-03T21:22:36Z

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