[PATCH 03/10] clk: tegra: Staticize local variables in clk-pll.c

Stephen Warren swarren at wwwdotorg.org
Tue Oct 15 11:10:27 EDT 2013


On 10/15/2013 02:29 AM, Peter De Schrijver wrote:
> On Mon, Oct 14, 2013 at 06:35:58PM +0200, Stephen Warren wrote:
>> On 10/14/2013 02:15 AM, Peter De Schrijver wrote:
>>> On Thu, Oct 10, 2013 at 06:07:38PM +0200, Stephen Warren wrote:
>>>> On 10/10/2013 05:13 AM, Peter De Schrijver wrote:
>>>>> On Tue, Oct 08, 2013 at 06:09:24PM +0200, Stephen Warren wrote:
>>>>>> On 10/08/2013 05:17 AM, Sachin Kamat wrote:
>>>>>>> Local variables used only in this file are made static.
>>>>>>
>>>>>
>>>>> Conceptually they are still exported. So I think it's counterintuitive to
>>>>> declare them static. Unless you expect namespace problems, I would rather
>>>>> leave it as is.
>>>>
>>>> I forget exactly which symbols this patch changed, but presumably
>>>> they're only exported via pointers rather than by symbol name, and isn't
>>>> that exactly what static is for?
>>>
>>> They are indeed exported using a pointer. depends on how you look at it I
>>> guess, but I see static as 'local to this file only' which isn't really
>>> true if you hand out pointers to others.
>>
>> Yes, static specifically means "the symbol name is local to this file".
>> It says nothing about the data behind the symbol name.
> 
> I would still prefer the symbol visibility to have some relation with how
> the data is used.

No, if the *symbol* is not used, it should be static. There's absolutely
zero benefit from having a visible symbol if it isn't used.




More information about the linux-arm-kernel mailing list