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

2018-10-02 Thread Greg KH
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


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

2018-10-02 Thread Greg KH
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


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

2018-10-02 Thread Roman Kiryanov
> 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"?


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

2018-10-02 Thread Roman Kiryanov
> 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"?


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

2018-10-02 Thread Greg KH
On Tue, Oct 02, 2018 at 03:18:49PM -0700, r...@google.com wrote:
> From: Roman Kiryanov 
> 
> This is a series of patches to remove mutable global variables
> to introduce another version of the pipe driver for the older
> host interface. I don't want to have two driver states where only
> one is used.

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);

?

That looks static to this file to me.

what am I missing here?

greg k-h


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

2018-10-02 Thread Greg KH
On Tue, Oct 02, 2018 at 03:18:49PM -0700, r...@google.com wrote:
> From: Roman Kiryanov 
> 
> This is a series of patches to remove mutable global variables
> to introduce another version of the pipe driver for the older
> host interface. I don't want to have two driver states where only
> one is used.

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);

?

That looks static to this file to me.

what am I missing here?

greg k-h