[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Mon, 5 May 2014 15:13:54 +0800
From: Ley Foon Tan <lftan@...era.com>
To: Arnd Bergmann <arnd@...db.de>
Cc: Linux-Arch <linux-arch@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
cltang@...esourcery.com
Subject: Re: [PATCH 07/28] nios2: I/O Mapping
On Fri, May 2, 2014 at 8:22 PM, Arnd Bergmann <arnd@...db.de> wrote:
>> >> I would recommend just doing all of this in out-of-line implementations
>> >> rather than macros and inline functions.
>> > Okay. Will move the macros to out-of-line function.
>>
>> I'm start working on this and found that it is better to keep it as
>> macros. This is because the input arguments "a" and "b" can be
>> byte/short/int pointers. Otherwise, we need to have separate function
>> calls for byte/short/int.
>
> But with the inline implementation, you have a separate instance for each
> caller, which seems more wasteful.
>
> You can put the function into a "lib" file to make sure it doesn't get linked
> in if there are no callers though. And of course you can keep the macro
> in the file implementing it so you don't have to write the same code
> three times.
I think we need to link these functions always (and export symbol)
because they might used by loadable module.
So, will keep these as macros and change the inline functions to
out-of-line implementation.
Thanks.
Regards
Ley Foon
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists