lkml.org 
[lkml]   [2018]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 01/15] platform: goldfish: pipe: Remove the goldfish_interrupt_tasklet global variable
On Tue, Oct 02, 2018 at 03:33:11PM -0700, Roman Kiryanov wrote:
> > I don't see a "global" variable here, what are you referring to.
> >
> > This one:
> >
> > > -static DECLARE_TASKLET(goldfish_interrupt_tasklet, goldfish_interrupt_task, 0);
> >
> > ?
>
> Yes.
>
> > That looks static to this file to me.
> > what am I missing here?
>
> It has a global lifetime but it is visible only in this file. How do I
> say better, just drop the word "global"?

Yes. It's not a global variable at all. It's file-scope only.

What you are doing is moving the variable to be attached to the device
itself, allowing you to have multiple devices handled by the same code,
which is great. But please document it as such.

Same goes for the other patches in this series.

thanks,

greg k-h

\
 
 \ /
  Last update: 2018-10-03 00:43    [W:0.055 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site