lkml.org 
[lkml]   [2014]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 07/28] nios2: I/O Mapping
From
On Fri, May 2, 2014 at 8:22 PM, Arnd Bergmann <arnd@arndb.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


\
 
 \ /
  Last update: 2014-05-05 09:41    [W:0.146 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site