Re: [PATCH 01/15] platform: goldfish: pipe: Remove the goldfish_interrupt_tasklet global variable

From: Greg KH
Date: Tue Oct 02 2018 - 18:42:25 EST


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