Subject: Re: [PATCH 1/5] [POWERPC] sysdev: implement FSL GTM support

From: Segher Boessenkool <[email-masked]>
Date: Mon, 21 Apr 2008 18:28:10 +0200

>>>  +static inline void gtm_ack_timer16(struct gtm_timer *tmr, u16 
>>> events)
>>>  +{
>>>  +       out_be16(tmr->gtevr, events);
>>>  +}
>>
>> Drop 'inline' and expect gcc to do the right thing.
>
> Not sure about newer gccs, but older complained about "defined but not
> used" functions w/o inline keyword. I'm almost sure that this is still
> true.

It is.  So why is it unused?  Because you put the code in the header
file.  Can't you move it to the .c file instead?

> I can surely use __maybe_unused, but "static inline" is pretty
> settled tradition, plus this function is small enough anyway.

All code in header files should be inline.  Code in implementation
files should only be inline if you have a very good reason for
doing so.  Same goes for __maybe_unused.

Segher