Re: [PATCH 4/5] usb: gadget: f_midi: cleanups and typos fixes

2016-03-07 Thread Felipe Balbi

Hi,

Felipe Ferreri Tonello  writes:
>>> On March 5, 2016 4:28:45 PM GMT+00:00, Michal Nazarewicz 
>>>  wrote:
>> On Wed, Mar 02 2016, Felipe F. Tonello wrote:
>>> @@ -16,7 +16,7 @@
>>>   *   Copyright (C) 2006 Thumtronics Pty Ltd.
>>>   *   Ben Williamson 
>>>   *
>>> - * Licensed under the GPL-2 or later.
>>> + * Licensed under the GPLv2.

> On March 4, 2016 7:17:31 PM GMT+00:00, Michal Nazarewicz
  wrote:
>> Any particular reason to do that?

 On Fri, Mar 04 2016, Felipe Ferreri Tonello wrote:
> Because the kernel is v2 only and not later. 

 Linux as a whole is GPLv2 only, but that doesn’t necessarily mean that
 parts of it cannot be dual licensed (or GPLv2+).  It’s safer to leave
 copyright noticed clear unless you explicitly want your contribution be
 GPLv2 only which brings the whole file GPLv2 only.

> I just tried to make this driver more consistent with the coding
 style
> used across the kernel. That's it.

 Column alignment of field names or RHS of assignment operators is quite
 inconsistent already within drivers/usb/gadget/ which is why I’m
 concerned whether this is really helping.

 Anyway, I actually don’t care much, just adding my two rappen.
>>>
>>> Right, I am ok with Balbi completely ignoring this patch. But I prefer
>>> to have at least this driver consistent than nothing. Of course I'll
>>> remove the license change I made.
>> 
>> consistent in what way ?
>
> Source-code.
>
> The goal of this patch is to update this driver coding style to promote
> consistency, readability, and maintainability based on the Linux coding
> style.
>
> If this patch does not achieving that or if that is not necessary, than
> just ignore this patch.

yeah, I don't think that's what you're doing here.

-- 
balbi


signature.asc
Description: PGP signature


Re: [PATCH 4/5] usb: gadget: f_midi: cleanups and typos fixes

2016-03-07 Thread Felipe Balbi

Hi,

Felipe Ferreri Tonello  writes:
>>> On March 5, 2016 4:28:45 PM GMT+00:00, Michal Nazarewicz 
>>>  wrote:
>> On Wed, Mar 02 2016, Felipe F. Tonello wrote:
>>> @@ -16,7 +16,7 @@
>>>   *   Copyright (C) 2006 Thumtronics Pty Ltd.
>>>   *   Ben Williamson 
>>>   *
>>> - * Licensed under the GPL-2 or later.
>>> + * Licensed under the GPLv2.

> On March 4, 2016 7:17:31 PM GMT+00:00, Michal Nazarewicz
  wrote:
>> Any particular reason to do that?

 On Fri, Mar 04 2016, Felipe Ferreri Tonello wrote:
> Because the kernel is v2 only and not later. 

 Linux as a whole is GPLv2 only, but that doesn’t necessarily mean that
 parts of it cannot be dual licensed (or GPLv2+).  It’s safer to leave
 copyright noticed clear unless you explicitly want your contribution be
 GPLv2 only which brings the whole file GPLv2 only.

> I just tried to make this driver more consistent with the coding
 style
> used across the kernel. That's it.

 Column alignment of field names or RHS of assignment operators is quite
 inconsistent already within drivers/usb/gadget/ which is why I’m
 concerned whether this is really helping.

 Anyway, I actually don’t care much, just adding my two rappen.
>>>
>>> Right, I am ok with Balbi completely ignoring this patch. But I prefer
>>> to have at least this driver consistent than nothing. Of course I'll
>>> remove the license change I made.
>> 
>> consistent in what way ?
>
> Source-code.
>
> The goal of this patch is to update this driver coding style to promote
> consistency, readability, and maintainability based on the Linux coding
> style.
>
> If this patch does not achieving that or if that is not necessary, than
> just ignore this patch.

yeah, I don't think that's what you're doing here.

-- 
balbi


signature.asc
Description: PGP signature


Re: [PATCH 4/5] usb: gadget: f_midi: cleanups and typos fixes

2016-03-07 Thread Felipe Ferreri Tonello
Hi Balbi,

On 07/03/16 07:35, Felipe Balbi wrote:
> 
> Hi,
> 
> Felipe Ferreri Tonello  writes:
>> [ text/plain ]
>> Hi Michal, 
>>
>> On March 5, 2016 4:28:45 PM GMT+00:00, Michal Nazarewicz  
>> wrote:
> On Wed, Mar 02 2016, Felipe F. Tonello wrote:
>> @@ -16,7 +16,7 @@
>>   *   Copyright (C) 2006 Thumtronics Pty Ltd.
>>   *   Ben Williamson 
>>   *
>> - * Licensed under the GPL-2 or later.
>> + * Licensed under the GPLv2.
>>>
 On March 4, 2016 7:17:31 PM GMT+00:00, Michal Nazarewicz
>>>  wrote:
> Any particular reason to do that?
>>>
>>> On Fri, Mar 04 2016, Felipe Ferreri Tonello wrote:
 Because the kernel is v2 only and not later. 
>>>
>>> Linux as a whole is GPLv2 only, but that doesn’t necessarily mean that
>>> parts of it cannot be dual licensed (or GPLv2+).  It’s safer to leave
>>> copyright noticed clear unless you explicitly want your contribution be
>>> GPLv2 only which brings the whole file GPLv2 only.
>>>
 I just tried to make this driver more consistent with the coding
>>> style
 used across the kernel. That's it.
>>>
>>> Column alignment of field names or RHS of assignment operators is quite
>>> inconsistent already within drivers/usb/gadget/ which is why I’m
>>> concerned whether this is really helping.
>>>
>>> Anyway, I actually don’t care much, just adding my two rappen.
>>
>> Right, I am ok with Balbi completely ignoring this patch. But I prefer
>> to have at least this driver consistent than nothing. Of course I'll
>> remove the license change I made.
> 
> consistent in what way ?

Source-code.

The goal of this patch is to update this driver coding style to promote
consistency, readability, and maintainability based on the Linux coding
style.

If this patch does not achieving that or if that is not necessary, than
just ignore this patch.

Thanks,
Felipe


0x92698E6A.asc
Description: application/pgp-keys


Re: [PATCH 4/5] usb: gadget: f_midi: cleanups and typos fixes

2016-03-07 Thread Felipe Ferreri Tonello
Hi Balbi,

On 07/03/16 07:35, Felipe Balbi wrote:
> 
> Hi,
> 
> Felipe Ferreri Tonello  writes:
>> [ text/plain ]
>> Hi Michal, 
>>
>> On March 5, 2016 4:28:45 PM GMT+00:00, Michal Nazarewicz  
>> wrote:
> On Wed, Mar 02 2016, Felipe F. Tonello wrote:
>> @@ -16,7 +16,7 @@
>>   *   Copyright (C) 2006 Thumtronics Pty Ltd.
>>   *   Ben Williamson 
>>   *
>> - * Licensed under the GPL-2 or later.
>> + * Licensed under the GPLv2.
>>>
 On March 4, 2016 7:17:31 PM GMT+00:00, Michal Nazarewicz
>>>  wrote:
> Any particular reason to do that?
>>>
>>> On Fri, Mar 04 2016, Felipe Ferreri Tonello wrote:
 Because the kernel is v2 only and not later. 
>>>
>>> Linux as a whole is GPLv2 only, but that doesn’t necessarily mean that
>>> parts of it cannot be dual licensed (or GPLv2+).  It’s safer to leave
>>> copyright noticed clear unless you explicitly want your contribution be
>>> GPLv2 only which brings the whole file GPLv2 only.
>>>
 I just tried to make this driver more consistent with the coding
>>> style
 used across the kernel. That's it.
>>>
>>> Column alignment of field names or RHS of assignment operators is quite
>>> inconsistent already within drivers/usb/gadget/ which is why I’m
>>> concerned whether this is really helping.
>>>
>>> Anyway, I actually don’t care much, just adding my two rappen.
>>
>> Right, I am ok with Balbi completely ignoring this patch. But I prefer
>> to have at least this driver consistent than nothing. Of course I'll
>> remove the license change I made.
> 
> consistent in what way ?

Source-code.

The goal of this patch is to update this driver coding style to promote
consistency, readability, and maintainability based on the Linux coding
style.

If this patch does not achieving that or if that is not necessary, than
just ignore this patch.

Thanks,
Felipe


0x92698E6A.asc
Description: application/pgp-keys


Re: [PATCH 4/5] usb: gadget: f_midi: cleanups and typos fixes

2016-03-06 Thread Felipe Balbi

Hi,

Felipe Ferreri Tonello  writes:
> [ text/plain ]
> Hi Michal, 
>
> On March 5, 2016 4:28:45 PM GMT+00:00, Michal Nazarewicz  
> wrote:
 On Wed, Mar 02 2016, Felipe F. Tonello wrote:
> @@ -16,7 +16,7 @@
>   *   Copyright (C) 2006 Thumtronics Pty Ltd.
>   *   Ben Williamson 
>   *
> - * Licensed under the GPL-2 or later.
> + * Licensed under the GPLv2.
>>
>>> On March 4, 2016 7:17:31 PM GMT+00:00, Michal Nazarewicz
>> wrote:
 Any particular reason to do that?
>>
>>On Fri, Mar 04 2016, Felipe Ferreri Tonello wrote:
>>> Because the kernel is v2 only and not later. 
>>
>>Linux as a whole is GPLv2 only, but that doesn’t necessarily mean that
>>parts of it cannot be dual licensed (or GPLv2+).  It’s safer to leave
>>copyright noticed clear unless you explicitly want your contribution be
>>GPLv2 only which brings the whole file GPLv2 only.
>>
>>> I just tried to make this driver more consistent with the coding
>>style
>>> used across the kernel. That's it.
>>
>>Column alignment of field names or RHS of assignment operators is quite
>>inconsistent already within drivers/usb/gadget/ which is why I’m
>>concerned whether this is really helping.
>>
>>Anyway, I actually don’t care much, just adding my two rappen.
>
> Right, I am ok with Balbi completely ignoring this patch. But I prefer
> to have at least this driver consistent than nothing. Of course I'll
> remove the license change I made.

consistent in what way ?

-- 
balbi


signature.asc
Description: PGP signature


Re: [PATCH 4/5] usb: gadget: f_midi: cleanups and typos fixes

2016-03-06 Thread Felipe Balbi

Hi,

Felipe Ferreri Tonello  writes:
> [ text/plain ]
> Hi Michal, 
>
> On March 5, 2016 4:28:45 PM GMT+00:00, Michal Nazarewicz  
> wrote:
 On Wed, Mar 02 2016, Felipe F. Tonello wrote:
> @@ -16,7 +16,7 @@
>   *   Copyright (C) 2006 Thumtronics Pty Ltd.
>   *   Ben Williamson 
>   *
> - * Licensed under the GPL-2 or later.
> + * Licensed under the GPLv2.
>>
>>> On March 4, 2016 7:17:31 PM GMT+00:00, Michal Nazarewicz
>> wrote:
 Any particular reason to do that?
>>
>>On Fri, Mar 04 2016, Felipe Ferreri Tonello wrote:
>>> Because the kernel is v2 only and not later. 
>>
>>Linux as a whole is GPLv2 only, but that doesn’t necessarily mean that
>>parts of it cannot be dual licensed (or GPLv2+).  It’s safer to leave
>>copyright noticed clear unless you explicitly want your contribution be
>>GPLv2 only which brings the whole file GPLv2 only.
>>
>>> I just tried to make this driver more consistent with the coding
>>style
>>> used across the kernel. That's it.
>>
>>Column alignment of field names or RHS of assignment operators is quite
>>inconsistent already within drivers/usb/gadget/ which is why I’m
>>concerned whether this is really helping.
>>
>>Anyway, I actually don’t care much, just adding my two rappen.
>
> Right, I am ok with Balbi completely ignoring this patch. But I prefer
> to have at least this driver consistent than nothing. Of course I'll
> remove the license change I made.

consistent in what way ?

-- 
balbi


signature.asc
Description: PGP signature


Re: [PATCH 4/5] usb: gadget: f_midi: cleanups and typos fixes

2016-03-05 Thread Greg KH
On Sat, Mar 05, 2016 at 11:53:35PM +, Felipe Ferreri Tonello wrote:
> Hi Greg, 
> 
> On March 5, 2016 7:39:13 PM GMT+00:00, Greg KH  wrote:
> >On Sat, Mar 05, 2016 at 11:28:45AM -0500, Michal Nazarewicz wrote:
> >> >> On Wed, Mar 02 2016, Felipe F. Tonello wrote:
> >> >>> @@ -16,7 +16,7 @@
> >> >>>   *   Copyright (C) 2006 Thumtronics Pty Ltd.
> >> >>>   *   Ben Williamson 
> >> >>>   *
> >> >>> - * Licensed under the GPL-2 or later.
> >> >>> + * Licensed under the GPLv2.
> >> 
> >> > On March 4, 2016 7:17:31 PM GMT+00:00, Michal Nazarewicz
> > wrote:
> >> >> Any particular reason to do that?
> >> 
> >> On Fri, Mar 04 2016, Felipe Ferreri Tonello wrote:
> >> > Because the kernel is v2 only and not later. 
> >> 
> >> Linux as a whole is GPLv2 only, but that doesn’t necessarily mean
> >that
> >> parts of it cannot be dual licensed (or GPLv2+).  It’s safer to leave
> >> copyright noticed clear unless you explicitly want your contribution
> >be
> >> GPLv2 only which brings the whole file GPLv2 only.
> >
> >But you can't change the license of someone else's code, which is what
> >is happening here.  Felipe T, you can't do that at all unless you want
> >to get into big trouble, please consult a lawyer for all of the gory
> >details.
> 
> Thanks for letting me know. TBH, I had no idea about it. 

Never change a copyright or a license if you don't know exactly what you
are doing, or why you are doing it, and have consulted with a lawyer
beforehand.  The issues here are real, don't take them lightly.

greg k-h


Re: [PATCH 4/5] usb: gadget: f_midi: cleanups and typos fixes

2016-03-05 Thread Greg KH
On Sat, Mar 05, 2016 at 11:53:35PM +, Felipe Ferreri Tonello wrote:
> Hi Greg, 
> 
> On March 5, 2016 7:39:13 PM GMT+00:00, Greg KH  wrote:
> >On Sat, Mar 05, 2016 at 11:28:45AM -0500, Michal Nazarewicz wrote:
> >> >> On Wed, Mar 02 2016, Felipe F. Tonello wrote:
> >> >>> @@ -16,7 +16,7 @@
> >> >>>   *   Copyright (C) 2006 Thumtronics Pty Ltd.
> >> >>>   *   Ben Williamson 
> >> >>>   *
> >> >>> - * Licensed under the GPL-2 or later.
> >> >>> + * Licensed under the GPLv2.
> >> 
> >> > On March 4, 2016 7:17:31 PM GMT+00:00, Michal Nazarewicz
> > wrote:
> >> >> Any particular reason to do that?
> >> 
> >> On Fri, Mar 04 2016, Felipe Ferreri Tonello wrote:
> >> > Because the kernel is v2 only and not later. 
> >> 
> >> Linux as a whole is GPLv2 only, but that doesn’t necessarily mean
> >that
> >> parts of it cannot be dual licensed (or GPLv2+).  It’s safer to leave
> >> copyright noticed clear unless you explicitly want your contribution
> >be
> >> GPLv2 only which brings the whole file GPLv2 only.
> >
> >But you can't change the license of someone else's code, which is what
> >is happening here.  Felipe T, you can't do that at all unless you want
> >to get into big trouble, please consult a lawyer for all of the gory
> >details.
> 
> Thanks for letting me know. TBH, I had no idea about it. 

Never change a copyright or a license if you don't know exactly what you
are doing, or why you are doing it, and have consulted with a lawyer
beforehand.  The issues here are real, don't take them lightly.

greg k-h


Re: [PATCH 4/5] usb: gadget: f_midi: cleanups and typos fixes

2016-03-05 Thread Felipe Ferreri Tonello
Hi Michal, 

On March 5, 2016 4:28:45 PM GMT+00:00, Michal Nazarewicz  
wrote:
>>> On Wed, Mar 02 2016, Felipe F. Tonello wrote:
 @@ -16,7 +16,7 @@
   *   Copyright (C) 2006 Thumtronics Pty Ltd.
   *   Ben Williamson 
   *
 - * Licensed under the GPL-2 or later.
 + * Licensed under the GPLv2.
>
>> On March 4, 2016 7:17:31 PM GMT+00:00, Michal Nazarewicz
> wrote:
>>> Any particular reason to do that?
>
>On Fri, Mar 04 2016, Felipe Ferreri Tonello wrote:
>> Because the kernel is v2 only and not later. 
>
>Linux as a whole is GPLv2 only, but that doesn’t necessarily mean that
>parts of it cannot be dual licensed (or GPLv2+).  It’s safer to leave
>copyright noticed clear unless you explicitly want your contribution be
>GPLv2 only which brings the whole file GPLv2 only.
>
>> I just tried to make this driver more consistent with the coding
>style
>> used across the kernel. That's it.
>
>Column alignment of field names or RHS of assignment operators is quite
>inconsistent already within drivers/usb/gadget/ which is why I’m
>concerned whether this is really helping.
>
>Anyway, I actually don’t care much, just adding my two rappen.

Right, I am ok with Balbi completely ignoring this patch. But I prefer to have 
at least this driver consistent than nothing. Of course I'll remove the license 
change I made. 

Felipe 

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.


Re: [PATCH 4/5] usb: gadget: f_midi: cleanups and typos fixes

2016-03-05 Thread Felipe Ferreri Tonello
Hi Michal, 

On March 5, 2016 4:28:45 PM GMT+00:00, Michal Nazarewicz  
wrote:
>>> On Wed, Mar 02 2016, Felipe F. Tonello wrote:
 @@ -16,7 +16,7 @@
   *   Copyright (C) 2006 Thumtronics Pty Ltd.
   *   Ben Williamson 
   *
 - * Licensed under the GPL-2 or later.
 + * Licensed under the GPLv2.
>
>> On March 4, 2016 7:17:31 PM GMT+00:00, Michal Nazarewicz
> wrote:
>>> Any particular reason to do that?
>
>On Fri, Mar 04 2016, Felipe Ferreri Tonello wrote:
>> Because the kernel is v2 only and not later. 
>
>Linux as a whole is GPLv2 only, but that doesn’t necessarily mean that
>parts of it cannot be dual licensed (or GPLv2+).  It’s safer to leave
>copyright noticed clear unless you explicitly want your contribution be
>GPLv2 only which brings the whole file GPLv2 only.
>
>> I just tried to make this driver more consistent with the coding
>style
>> used across the kernel. That's it.
>
>Column alignment of field names or RHS of assignment operators is quite
>inconsistent already within drivers/usb/gadget/ which is why I’m
>concerned whether this is really helping.
>
>Anyway, I actually don’t care much, just adding my two rappen.

Right, I am ok with Balbi completely ignoring this patch. But I prefer to have 
at least this driver consistent than nothing. Of course I'll remove the license 
change I made. 

Felipe 

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.


Re: [PATCH 4/5] usb: gadget: f_midi: cleanups and typos fixes

2016-03-05 Thread Felipe Ferreri Tonello
Hi Greg, 

On March 5, 2016 7:39:13 PM GMT+00:00, Greg KH  wrote:
>On Sat, Mar 05, 2016 at 11:28:45AM -0500, Michal Nazarewicz wrote:
>> >> On Wed, Mar 02 2016, Felipe F. Tonello wrote:
>> >>> @@ -16,7 +16,7 @@
>> >>>   *   Copyright (C) 2006 Thumtronics Pty Ltd.
>> >>>   *   Ben Williamson 
>> >>>   *
>> >>> - * Licensed under the GPL-2 or later.
>> >>> + * Licensed under the GPLv2.
>> 
>> > On March 4, 2016 7:17:31 PM GMT+00:00, Michal Nazarewicz
> wrote:
>> >> Any particular reason to do that?
>> 
>> On Fri, Mar 04 2016, Felipe Ferreri Tonello wrote:
>> > Because the kernel is v2 only and not later. 
>> 
>> Linux as a whole is GPLv2 only, but that doesn’t necessarily mean
>that
>> parts of it cannot be dual licensed (or GPLv2+).  It’s safer to leave
>> copyright noticed clear unless you explicitly want your contribution
>be
>> GPLv2 only which brings the whole file GPLv2 only.
>
>But you can't change the license of someone else's code, which is what
>is happening here.  Felipe T, you can't do that at all unless you want
>to get into big trouble, please consult a lawyer for all of the gory
>details.

Thanks for letting me know. TBH, I had no idea about it. 

Felipe 

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.


Re: [PATCH 4/5] usb: gadget: f_midi: cleanups and typos fixes

2016-03-05 Thread Felipe Ferreri Tonello
Hi Greg, 

On March 5, 2016 7:39:13 PM GMT+00:00, Greg KH  wrote:
>On Sat, Mar 05, 2016 at 11:28:45AM -0500, Michal Nazarewicz wrote:
>> >> On Wed, Mar 02 2016, Felipe F. Tonello wrote:
>> >>> @@ -16,7 +16,7 @@
>> >>>   *   Copyright (C) 2006 Thumtronics Pty Ltd.
>> >>>   *   Ben Williamson 
>> >>>   *
>> >>> - * Licensed under the GPL-2 or later.
>> >>> + * Licensed under the GPLv2.
>> 
>> > On March 4, 2016 7:17:31 PM GMT+00:00, Michal Nazarewicz
> wrote:
>> >> Any particular reason to do that?
>> 
>> On Fri, Mar 04 2016, Felipe Ferreri Tonello wrote:
>> > Because the kernel is v2 only and not later. 
>> 
>> Linux as a whole is GPLv2 only, but that doesn’t necessarily mean
>that
>> parts of it cannot be dual licensed (or GPLv2+).  It’s safer to leave
>> copyright noticed clear unless you explicitly want your contribution
>be
>> GPLv2 only which brings the whole file GPLv2 only.
>
>But you can't change the license of someone else's code, which is what
>is happening here.  Felipe T, you can't do that at all unless you want
>to get into big trouble, please consult a lawyer for all of the gory
>details.

Thanks for letting me know. TBH, I had no idea about it. 

Felipe 

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.


Re: [PATCH 4/5] usb: gadget: f_midi: cleanups and typos fixes

2016-03-05 Thread Greg KH
On Sat, Mar 05, 2016 at 11:28:45AM -0500, Michal Nazarewicz wrote:
> >> On Wed, Mar 02 2016, Felipe F. Tonello wrote:
> >>> @@ -16,7 +16,7 @@
> >>>   *   Copyright (C) 2006 Thumtronics Pty Ltd.
> >>>   *   Ben Williamson 
> >>>   *
> >>> - * Licensed under the GPL-2 or later.
> >>> + * Licensed under the GPLv2.
> 
> > On March 4, 2016 7:17:31 PM GMT+00:00, Michal Nazarewicz 
> >  wrote:
> >> Any particular reason to do that?
> 
> On Fri, Mar 04 2016, Felipe Ferreri Tonello wrote:
> > Because the kernel is v2 only and not later. 
> 
> Linux as a whole is GPLv2 only, but that doesn’t necessarily mean that
> parts of it cannot be dual licensed (or GPLv2+).  It’s safer to leave
> copyright noticed clear unless you explicitly want your contribution be
> GPLv2 only which brings the whole file GPLv2 only.

But you can't change the license of someone else's code, which is what
is happening here.  Felipe T, you can't do that at all unless you want
to get into big trouble, please consult a lawyer for all of the gory
details.

greg k-h


Re: [PATCH 4/5] usb: gadget: f_midi: cleanups and typos fixes

2016-03-05 Thread Greg KH
On Sat, Mar 05, 2016 at 11:28:45AM -0500, Michal Nazarewicz wrote:
> >> On Wed, Mar 02 2016, Felipe F. Tonello wrote:
> >>> @@ -16,7 +16,7 @@
> >>>   *   Copyright (C) 2006 Thumtronics Pty Ltd.
> >>>   *   Ben Williamson 
> >>>   *
> >>> - * Licensed under the GPL-2 or later.
> >>> + * Licensed under the GPLv2.
> 
> > On March 4, 2016 7:17:31 PM GMT+00:00, Michal Nazarewicz 
> >  wrote:
> >> Any particular reason to do that?
> 
> On Fri, Mar 04 2016, Felipe Ferreri Tonello wrote:
> > Because the kernel is v2 only and not later. 
> 
> Linux as a whole is GPLv2 only, but that doesn’t necessarily mean that
> parts of it cannot be dual licensed (or GPLv2+).  It’s safer to leave
> copyright noticed clear unless you explicitly want your contribution be
> GPLv2 only which brings the whole file GPLv2 only.

But you can't change the license of someone else's code, which is what
is happening here.  Felipe T, you can't do that at all unless you want
to get into big trouble, please consult a lawyer for all of the gory
details.

greg k-h


Re: [PATCH 4/5] usb: gadget: f_midi: cleanups and typos fixes

2016-03-05 Thread Michal Nazarewicz
>> On Wed, Mar 02 2016, Felipe F. Tonello wrote:
>>> @@ -16,7 +16,7 @@
>>>   *   Copyright (C) 2006 Thumtronics Pty Ltd.
>>>   *   Ben Williamson 
>>>   *
>>> - * Licensed under the GPL-2 or later.
>>> + * Licensed under the GPLv2.

> On March 4, 2016 7:17:31 PM GMT+00:00, Michal Nazarewicz  
> wrote:
>> Any particular reason to do that?

On Fri, Mar 04 2016, Felipe Ferreri Tonello wrote:
> Because the kernel is v2 only and not later. 

Linux as a whole is GPLv2 only, but that doesn’t necessarily mean that
parts of it cannot be dual licensed (or GPLv2+).  It’s safer to leave
copyright noticed clear unless you explicitly want your contribution be
GPLv2 only which brings the whole file GPLv2 only.

> I just tried to make this driver more consistent with the coding style
> used across the kernel. That's it.

Column alignment of field names or RHS of assignment operators is quite
inconsistent already within drivers/usb/gadget/ which is why I’m
concerned whether this is really helping.

Anyway, I actually don’t care much, just adding my two rappen.

-- 
Best regards
ミハウ “퓶퓲퓷퓪86” ナザレヴイツ
«If at first you don’t succeed, give up skydiving»


Re: [PATCH 4/5] usb: gadget: f_midi: cleanups and typos fixes

2016-03-05 Thread Michal Nazarewicz
>> On Wed, Mar 02 2016, Felipe F. Tonello wrote:
>>> @@ -16,7 +16,7 @@
>>>   *   Copyright (C) 2006 Thumtronics Pty Ltd.
>>>   *   Ben Williamson 
>>>   *
>>> - * Licensed under the GPL-2 or later.
>>> + * Licensed under the GPLv2.

> On March 4, 2016 7:17:31 PM GMT+00:00, Michal Nazarewicz  
> wrote:
>> Any particular reason to do that?

On Fri, Mar 04 2016, Felipe Ferreri Tonello wrote:
> Because the kernel is v2 only and not later. 

Linux as a whole is GPLv2 only, but that doesn’t necessarily mean that
parts of it cannot be dual licensed (or GPLv2+).  It’s safer to leave
copyright noticed clear unless you explicitly want your contribution be
GPLv2 only which brings the whole file GPLv2 only.

> I just tried to make this driver more consistent with the coding style
> used across the kernel. That's it.

Column alignment of field names or RHS of assignment operators is quite
inconsistent already within drivers/usb/gadget/ which is why I’m
concerned whether this is really helping.

Anyway, I actually don’t care much, just adding my two rappen.

-- 
Best regards
ミハウ “퓶퓲퓷퓪86” ナザレヴイツ
«If at first you don’t succeed, give up skydiving»


Re: [PATCH 4/5] usb: gadget: f_midi: cleanups and typos fixes

2016-03-04 Thread Felipe Ferreri Tonello
Hi Michal, 

On March 4, 2016 7:17:31 PM GMT+00:00, Michal Nazarewicz  
wrote:
>On Wed, Mar 02 2016, Felipe F. Tonello wrote:
>> Signed-off-by: Felipe F. Tonello 
>> ---
>>  drivers/usb/gadget/function/f_midi.c | 77
>+++-
>>  1 file changed, 40 insertions(+), 37 deletions(-)
>>
>> diff --git a/drivers/usb/gadget/function/f_midi.c
>b/drivers/usb/gadget/function/f_midi.c
>> index 8475e3dc82d4..9a9e6112e224 100644
>> --- a/drivers/usb/gadget/function/f_midi.c
>> +++ b/drivers/usb/gadget/function/f_midi.c
>> @@ -1,5 +1,5 @@
>>  /*
>> - * f_midi.c -- USB MIDI class function driver
>> + * f_midi.c -- USB-MIDI class function driver
>>   *
>>   * Copyright (C) 2006 Thumtronics Pty Ltd.
>>   * Developed for Thumtronics by Grey Innovation
>> @@ -16,7 +16,7 @@
>>   *   Copyright (C) 2006 Thumtronics Pty Ltd.
>>   *   Ben Williamson 
>>   *
>> - * Licensed under the GPL-2 or later.
>> + * Licensed under the GPLv2.
>
>Any particular reason to do that?

Because the kernel is v2 only and not later. 

>
>>   */
>>  
>>  #include 
>> @@ -41,8 +41,8 @@
>>  MODULE_AUTHOR("Ben Williamson");
>>  MODULE_LICENSE("GPL v2");
>>  
>> -static const char f_midi_shortname[] = "f_midi";
>> -static const char f_midi_longname[] = "MIDI Gadget";
>> +static const char f_midi_shortname[] =  "f_midi";
>> +static const char f_midi_longname[] =   "MIDI Gadget";
>>  
>>  /*
>>   * We can only handle 16 cables on one single endpoint, as cable
>numbers are
>> @@ -78,28 +78,31 @@ struct gmidi_in_port {
>>  };
>>  
>>  struct f_midi {
>> -struct usb_function func;
>> -struct usb_gadget   *gadget;
>> -struct usb_ep   *in_ep, *out_ep;
>> -struct snd_card *card;
>> -struct snd_rawmidi  *rmidi;
>> -u8  ms_id;
>> -
>> -struct snd_rawmidi_substream *out_substream[MAX_PORTS];
>> -
>> -unsigned long   out_triggered;
>> -struct tasklet_struct   tasklet;
>> +struct usb_function func;
>> +struct usb_gadget *gadget;
>> +struct usb_ep *in_ep, *out_ep;
>> +u8 ms_id;
>> +unsigned long out_triggered;
>>  unsigned int in_ports;
>>  unsigned int out_ports;
>> -int index;
>> -char *id;
>> -unsigned int buflen, qlen;
>> +unsigned int buflen;
>> +unsigned int qlen;
>> +unsigned int len;
>> +
>>  /* This fifo is used as a buffer ring for pre-allocated IN
>usb_requests */
>>  DECLARE_KFIFO_PTR(in_req_fifo, struct usb_request *);
>>  spinlock_t transmit_lock;
>> +
>> +/* ALSA stuff */
>> +struct snd_card *card;
>> +struct snd_rawmidi *rmidi;
>> +struct snd_rawmidi_substream *out_substream[MAX_PORTS];
>> +struct tasklet_struct tasklet;
>>  unsigned int in_last_port;
>> +int index;
>> +char *id;
>>  
>> -struct gmidi_in_portin_ports_array[/* in_ports */];
>> +struct gmidi_in_port in_ports_array[/* in_ports */];
>>  };
>>  
>>  static inline struct f_midi *func_to_midi(struct usb_function *f)
>> @@ -191,7 +194,7 @@ static struct usb_ms_endpoint_descriptor_16
>ms_in_desc = {
>>  
>>  /* string IDs are assigned dynamically */
>>  
>> -#define STRING_FUNC_IDX 0
>> +#define STRING_FUNC_IDX 0
>>  
>>  static struct usb_string midi_string_defs[] = {
>>  [STRING_FUNC_IDX].s = "MIDI function",
>> @@ -199,7 +202,7 @@ static struct usb_string midi_string_defs[] = {
>>  };
>>  
>>  static struct usb_gadget_strings midi_stringtab = {
>> -.language   = 0x0409,   /* en-us */
>> +.language   = 0x0409, /* en-us */
>>  .strings= midi_string_defs,
>>  };
>>  
>> @@ -409,7 +412,7 @@ static int f_midi_snd_free(struct snd_device
>*device)
>>  }
>>  
>>  /*
>> - * Converts MIDI commands to USB MIDI packets.
>> + * Converts MIDI commands to USB-MIDI packets.
>>   */
>>  static void f_midi_transmit_byte(struct usb_request *req,
>>   struct gmidi_in_port *port, uint8_t b)
>> @@ -956,15 +959,15 @@ static int f_midi_bind(struct usb_configuration
>*c, struct usb_function *f)
>>  in_emb->iJack   = 0;
>>  midi_function[i++] = (struct usb_descriptor_header *) in_emb;
>>  
>> -out_ext->bLength =  USB_DT_MIDI_OUT_SIZE(1);
>> -out_ext->bDescriptorType =  USB_DT_CS_INTERFACE;
>> -out_ext->bDescriptorSubtype =   USB_MS_MIDI_OUT_JACK;
>> -out_ext->bJackType =USB_MS_EXTERNAL;
>> -out_ext->bJackID =  jack++;
>> -out_ext->bNrInputPins = 1;
>> -out_ext->iJack =0;
>> -out_ext->pins[0].baSourceID =   in_emb->bJackID;
>> -out_ext->pins[0].baSourcePin =  1;
>> +out_ext->bLength= USB_DT_MIDI_OUT_SIZE(1);
>> +out_ext->bDescriptorType= USB_DT_CS_INTERFACE;
>> +

Re: [PATCH 4/5] usb: gadget: f_midi: cleanups and typos fixes

2016-03-04 Thread Felipe Ferreri Tonello
Hi Michal, 

On March 4, 2016 7:17:31 PM GMT+00:00, Michal Nazarewicz  
wrote:
>On Wed, Mar 02 2016, Felipe F. Tonello wrote:
>> Signed-off-by: Felipe F. Tonello 
>> ---
>>  drivers/usb/gadget/function/f_midi.c | 77
>+++-
>>  1 file changed, 40 insertions(+), 37 deletions(-)
>>
>> diff --git a/drivers/usb/gadget/function/f_midi.c
>b/drivers/usb/gadget/function/f_midi.c
>> index 8475e3dc82d4..9a9e6112e224 100644
>> --- a/drivers/usb/gadget/function/f_midi.c
>> +++ b/drivers/usb/gadget/function/f_midi.c
>> @@ -1,5 +1,5 @@
>>  /*
>> - * f_midi.c -- USB MIDI class function driver
>> + * f_midi.c -- USB-MIDI class function driver
>>   *
>>   * Copyright (C) 2006 Thumtronics Pty Ltd.
>>   * Developed for Thumtronics by Grey Innovation
>> @@ -16,7 +16,7 @@
>>   *   Copyright (C) 2006 Thumtronics Pty Ltd.
>>   *   Ben Williamson 
>>   *
>> - * Licensed under the GPL-2 or later.
>> + * Licensed under the GPLv2.
>
>Any particular reason to do that?

Because the kernel is v2 only and not later. 

>
>>   */
>>  
>>  #include 
>> @@ -41,8 +41,8 @@
>>  MODULE_AUTHOR("Ben Williamson");
>>  MODULE_LICENSE("GPL v2");
>>  
>> -static const char f_midi_shortname[] = "f_midi";
>> -static const char f_midi_longname[] = "MIDI Gadget";
>> +static const char f_midi_shortname[] =  "f_midi";
>> +static const char f_midi_longname[] =   "MIDI Gadget";
>>  
>>  /*
>>   * We can only handle 16 cables on one single endpoint, as cable
>numbers are
>> @@ -78,28 +78,31 @@ struct gmidi_in_port {
>>  };
>>  
>>  struct f_midi {
>> -struct usb_function func;
>> -struct usb_gadget   *gadget;
>> -struct usb_ep   *in_ep, *out_ep;
>> -struct snd_card *card;
>> -struct snd_rawmidi  *rmidi;
>> -u8  ms_id;
>> -
>> -struct snd_rawmidi_substream *out_substream[MAX_PORTS];
>> -
>> -unsigned long   out_triggered;
>> -struct tasklet_struct   tasklet;
>> +struct usb_function func;
>> +struct usb_gadget *gadget;
>> +struct usb_ep *in_ep, *out_ep;
>> +u8 ms_id;
>> +unsigned long out_triggered;
>>  unsigned int in_ports;
>>  unsigned int out_ports;
>> -int index;
>> -char *id;
>> -unsigned int buflen, qlen;
>> +unsigned int buflen;
>> +unsigned int qlen;
>> +unsigned int len;
>> +
>>  /* This fifo is used as a buffer ring for pre-allocated IN
>usb_requests */
>>  DECLARE_KFIFO_PTR(in_req_fifo, struct usb_request *);
>>  spinlock_t transmit_lock;
>> +
>> +/* ALSA stuff */
>> +struct snd_card *card;
>> +struct snd_rawmidi *rmidi;
>> +struct snd_rawmidi_substream *out_substream[MAX_PORTS];
>> +struct tasklet_struct tasklet;
>>  unsigned int in_last_port;
>> +int index;
>> +char *id;
>>  
>> -struct gmidi_in_portin_ports_array[/* in_ports */];
>> +struct gmidi_in_port in_ports_array[/* in_ports */];
>>  };
>>  
>>  static inline struct f_midi *func_to_midi(struct usb_function *f)
>> @@ -191,7 +194,7 @@ static struct usb_ms_endpoint_descriptor_16
>ms_in_desc = {
>>  
>>  /* string IDs are assigned dynamically */
>>  
>> -#define STRING_FUNC_IDX 0
>> +#define STRING_FUNC_IDX 0
>>  
>>  static struct usb_string midi_string_defs[] = {
>>  [STRING_FUNC_IDX].s = "MIDI function",
>> @@ -199,7 +202,7 @@ static struct usb_string midi_string_defs[] = {
>>  };
>>  
>>  static struct usb_gadget_strings midi_stringtab = {
>> -.language   = 0x0409,   /* en-us */
>> +.language   = 0x0409, /* en-us */
>>  .strings= midi_string_defs,
>>  };
>>  
>> @@ -409,7 +412,7 @@ static int f_midi_snd_free(struct snd_device
>*device)
>>  }
>>  
>>  /*
>> - * Converts MIDI commands to USB MIDI packets.
>> + * Converts MIDI commands to USB-MIDI packets.
>>   */
>>  static void f_midi_transmit_byte(struct usb_request *req,
>>   struct gmidi_in_port *port, uint8_t b)
>> @@ -956,15 +959,15 @@ static int f_midi_bind(struct usb_configuration
>*c, struct usb_function *f)
>>  in_emb->iJack   = 0;
>>  midi_function[i++] = (struct usb_descriptor_header *) in_emb;
>>  
>> -out_ext->bLength =  USB_DT_MIDI_OUT_SIZE(1);
>> -out_ext->bDescriptorType =  USB_DT_CS_INTERFACE;
>> -out_ext->bDescriptorSubtype =   USB_MS_MIDI_OUT_JACK;
>> -out_ext->bJackType =USB_MS_EXTERNAL;
>> -out_ext->bJackID =  jack++;
>> -out_ext->bNrInputPins = 1;
>> -out_ext->iJack =0;
>> -out_ext->pins[0].baSourceID =   in_emb->bJackID;
>> -out_ext->pins[0].baSourcePin =  1;
>> +out_ext->bLength= USB_DT_MIDI_OUT_SIZE(1);
>> +out_ext->bDescriptorType= USB_DT_CS_INTERFACE;
>> +out_ext->bDescriptorSubtype = USB_MS_MIDI_OUT_JACK;
>> +

Re: [PATCH 4/5] usb: gadget: f_midi: cleanups and typos fixes

2016-03-04 Thread Michal Nazarewicz
On Wed, Mar 02 2016, Felipe F. Tonello wrote:
> Signed-off-by: Felipe F. Tonello 
> ---
>  drivers/usb/gadget/function/f_midi.c | 77 
> +++-
>  1 file changed, 40 insertions(+), 37 deletions(-)
>
> diff --git a/drivers/usb/gadget/function/f_midi.c 
> b/drivers/usb/gadget/function/f_midi.c
> index 8475e3dc82d4..9a9e6112e224 100644
> --- a/drivers/usb/gadget/function/f_midi.c
> +++ b/drivers/usb/gadget/function/f_midi.c
> @@ -1,5 +1,5 @@
>  /*
> - * f_midi.c -- USB MIDI class function driver
> + * f_midi.c -- USB-MIDI class function driver
>   *
>   * Copyright (C) 2006 Thumtronics Pty Ltd.
>   * Developed for Thumtronics by Grey Innovation
> @@ -16,7 +16,7 @@
>   *   Copyright (C) 2006 Thumtronics Pty Ltd.
>   *   Ben Williamson 
>   *
> - * Licensed under the GPL-2 or later.
> + * Licensed under the GPLv2.

Any particular reason to do that?

>   */
>  
>  #include 
> @@ -41,8 +41,8 @@
>  MODULE_AUTHOR("Ben Williamson");
>  MODULE_LICENSE("GPL v2");
>  
> -static const char f_midi_shortname[] = "f_midi";
> -static const char f_midi_longname[] = "MIDI Gadget";
> +static const char f_midi_shortname[] =   "f_midi";
> +static const char f_midi_longname[] ="MIDI Gadget";
>  
>  /*
>   * We can only handle 16 cables on one single endpoint, as cable numbers are
> @@ -78,28 +78,31 @@ struct gmidi_in_port {
>  };
>  
>  struct f_midi {
> - struct usb_function func;
> - struct usb_gadget   *gadget;
> - struct usb_ep   *in_ep, *out_ep;
> - struct snd_card *card;
> - struct snd_rawmidi  *rmidi;
> - u8  ms_id;
> -
> - struct snd_rawmidi_substream *out_substream[MAX_PORTS];
> -
> - unsigned long   out_triggered;
> - struct tasklet_struct   tasklet;
> + struct usb_function func;
> + struct usb_gadget *gadget;
> + struct usb_ep *in_ep, *out_ep;
> + u8 ms_id;
> + unsigned long out_triggered;
>   unsigned int in_ports;
>   unsigned int out_ports;
> - int index;
> - char *id;
> - unsigned int buflen, qlen;
> + unsigned int buflen;
> + unsigned int qlen;
> + unsigned int len;
> +
>   /* This fifo is used as a buffer ring for pre-allocated IN usb_requests 
> */
>   DECLARE_KFIFO_PTR(in_req_fifo, struct usb_request *);
>   spinlock_t transmit_lock;
> +
> + /* ALSA stuff */
> + struct snd_card *card;
> + struct snd_rawmidi *rmidi;
> + struct snd_rawmidi_substream *out_substream[MAX_PORTS];
> + struct tasklet_struct tasklet;
>   unsigned int in_last_port;
> + int index;
> + char *id;
>  
> - struct gmidi_in_portin_ports_array[/* in_ports */];
> + struct gmidi_in_port in_ports_array[/* in_ports */];
>  };
>  
>  static inline struct f_midi *func_to_midi(struct usb_function *f)
> @@ -191,7 +194,7 @@ static struct usb_ms_endpoint_descriptor_16 ms_in_desc = {
>  
>  /* string IDs are assigned dynamically */
>  
> -#define STRING_FUNC_IDX  0
> +#define STRING_FUNC_IDX 0
>  
>  static struct usb_string midi_string_defs[] = {
>   [STRING_FUNC_IDX].s = "MIDI function",
> @@ -199,7 +202,7 @@ static struct usb_string midi_string_defs[] = {
>  };
>  
>  static struct usb_gadget_strings midi_stringtab = {
> - .language   = 0x0409,   /* en-us */
> + .language   = 0x0409, /* en-us */
>   .strings= midi_string_defs,
>  };
>  
> @@ -409,7 +412,7 @@ static int f_midi_snd_free(struct snd_device *device)
>  }
>  
>  /*
> - * Converts MIDI commands to USB MIDI packets.
> + * Converts MIDI commands to USB-MIDI packets.
>   */
>  static void f_midi_transmit_byte(struct usb_request *req,
>struct gmidi_in_port *port, uint8_t b)
> @@ -956,15 +959,15 @@ static int f_midi_bind(struct usb_configuration *c, 
> struct usb_function *f)
>   in_emb->iJack   = 0;
>   midi_function[i++] = (struct usb_descriptor_header *) in_emb;
>  
> - out_ext->bLength =  USB_DT_MIDI_OUT_SIZE(1);
> - out_ext->bDescriptorType =  USB_DT_CS_INTERFACE;
> - out_ext->bDescriptorSubtype =   USB_MS_MIDI_OUT_JACK;
> - out_ext->bJackType =USB_MS_EXTERNAL;
> - out_ext->bJackID =  jack++;
> - out_ext->bNrInputPins = 1;
> - out_ext->iJack =0;
> - out_ext->pins[0].baSourceID =   in_emb->bJackID;
> - out_ext->pins[0].baSourcePin =  1;
> + out_ext->bLength= USB_DT_MIDI_OUT_SIZE(1);
> + out_ext->bDescriptorType= USB_DT_CS_INTERFACE;
> + out_ext->bDescriptorSubtype = USB_MS_MIDI_OUT_JACK;
> + out_ext->bJackType  = USB_MS_EXTERNAL;
> + out_ext->bJackID= jack++;
> + 

Re: [PATCH 4/5] usb: gadget: f_midi: cleanups and typos fixes

2016-03-04 Thread Michal Nazarewicz
On Wed, Mar 02 2016, Felipe F. Tonello wrote:
> Signed-off-by: Felipe F. Tonello 
> ---
>  drivers/usb/gadget/function/f_midi.c | 77 
> +++-
>  1 file changed, 40 insertions(+), 37 deletions(-)
>
> diff --git a/drivers/usb/gadget/function/f_midi.c 
> b/drivers/usb/gadget/function/f_midi.c
> index 8475e3dc82d4..9a9e6112e224 100644
> --- a/drivers/usb/gadget/function/f_midi.c
> +++ b/drivers/usb/gadget/function/f_midi.c
> @@ -1,5 +1,5 @@
>  /*
> - * f_midi.c -- USB MIDI class function driver
> + * f_midi.c -- USB-MIDI class function driver
>   *
>   * Copyright (C) 2006 Thumtronics Pty Ltd.
>   * Developed for Thumtronics by Grey Innovation
> @@ -16,7 +16,7 @@
>   *   Copyright (C) 2006 Thumtronics Pty Ltd.
>   *   Ben Williamson 
>   *
> - * Licensed under the GPL-2 or later.
> + * Licensed under the GPLv2.

Any particular reason to do that?

>   */
>  
>  #include 
> @@ -41,8 +41,8 @@
>  MODULE_AUTHOR("Ben Williamson");
>  MODULE_LICENSE("GPL v2");
>  
> -static const char f_midi_shortname[] = "f_midi";
> -static const char f_midi_longname[] = "MIDI Gadget";
> +static const char f_midi_shortname[] =   "f_midi";
> +static const char f_midi_longname[] ="MIDI Gadget";
>  
>  /*
>   * We can only handle 16 cables on one single endpoint, as cable numbers are
> @@ -78,28 +78,31 @@ struct gmidi_in_port {
>  };
>  
>  struct f_midi {
> - struct usb_function func;
> - struct usb_gadget   *gadget;
> - struct usb_ep   *in_ep, *out_ep;
> - struct snd_card *card;
> - struct snd_rawmidi  *rmidi;
> - u8  ms_id;
> -
> - struct snd_rawmidi_substream *out_substream[MAX_PORTS];
> -
> - unsigned long   out_triggered;
> - struct tasklet_struct   tasklet;
> + struct usb_function func;
> + struct usb_gadget *gadget;
> + struct usb_ep *in_ep, *out_ep;
> + u8 ms_id;
> + unsigned long out_triggered;
>   unsigned int in_ports;
>   unsigned int out_ports;
> - int index;
> - char *id;
> - unsigned int buflen, qlen;
> + unsigned int buflen;
> + unsigned int qlen;
> + unsigned int len;
> +
>   /* This fifo is used as a buffer ring for pre-allocated IN usb_requests 
> */
>   DECLARE_KFIFO_PTR(in_req_fifo, struct usb_request *);
>   spinlock_t transmit_lock;
> +
> + /* ALSA stuff */
> + struct snd_card *card;
> + struct snd_rawmidi *rmidi;
> + struct snd_rawmidi_substream *out_substream[MAX_PORTS];
> + struct tasklet_struct tasklet;
>   unsigned int in_last_port;
> + int index;
> + char *id;
>  
> - struct gmidi_in_portin_ports_array[/* in_ports */];
> + struct gmidi_in_port in_ports_array[/* in_ports */];
>  };
>  
>  static inline struct f_midi *func_to_midi(struct usb_function *f)
> @@ -191,7 +194,7 @@ static struct usb_ms_endpoint_descriptor_16 ms_in_desc = {
>  
>  /* string IDs are assigned dynamically */
>  
> -#define STRING_FUNC_IDX  0
> +#define STRING_FUNC_IDX 0
>  
>  static struct usb_string midi_string_defs[] = {
>   [STRING_FUNC_IDX].s = "MIDI function",
> @@ -199,7 +202,7 @@ static struct usb_string midi_string_defs[] = {
>  };
>  
>  static struct usb_gadget_strings midi_stringtab = {
> - .language   = 0x0409,   /* en-us */
> + .language   = 0x0409, /* en-us */
>   .strings= midi_string_defs,
>  };
>  
> @@ -409,7 +412,7 @@ static int f_midi_snd_free(struct snd_device *device)
>  }
>  
>  /*
> - * Converts MIDI commands to USB MIDI packets.
> + * Converts MIDI commands to USB-MIDI packets.
>   */
>  static void f_midi_transmit_byte(struct usb_request *req,
>struct gmidi_in_port *port, uint8_t b)
> @@ -956,15 +959,15 @@ static int f_midi_bind(struct usb_configuration *c, 
> struct usb_function *f)
>   in_emb->iJack   = 0;
>   midi_function[i++] = (struct usb_descriptor_header *) in_emb;
>  
> - out_ext->bLength =  USB_DT_MIDI_OUT_SIZE(1);
> - out_ext->bDescriptorType =  USB_DT_CS_INTERFACE;
> - out_ext->bDescriptorSubtype =   USB_MS_MIDI_OUT_JACK;
> - out_ext->bJackType =USB_MS_EXTERNAL;
> - out_ext->bJackID =  jack++;
> - out_ext->bNrInputPins = 1;
> - out_ext->iJack =0;
> - out_ext->pins[0].baSourceID =   in_emb->bJackID;
> - out_ext->pins[0].baSourcePin =  1;
> + out_ext->bLength= USB_DT_MIDI_OUT_SIZE(1);
> + out_ext->bDescriptorType= USB_DT_CS_INTERFACE;
> + out_ext->bDescriptorSubtype = USB_MS_MIDI_OUT_JACK;
> + out_ext->bJackType  = USB_MS_EXTERNAL;
> + out_ext->bJackID= jack++;
> + out_ext->bNrInputPins   = 1;
> + out_ext->iJack 

Re: [PATCH 4/5] usb: gadget: f_midi: cleanups and typos fixes

2016-03-03 Thread Felipe Balbi
"Felipe F. Tonello"  writes:
> [ text/plain ]
> Signed-off-by: Felipe F. Tonello 

no commit log == no commit

-- 
balbi


signature.asc
Description: PGP signature


Re: [PATCH 4/5] usb: gadget: f_midi: cleanups and typos fixes

2016-03-03 Thread Felipe Balbi
"Felipe F. Tonello"  writes:
> [ text/plain ]
> Signed-off-by: Felipe F. Tonello 

no commit log == no commit

-- 
balbi


signature.asc
Description: PGP signature


[PATCH 4/5] usb: gadget: f_midi: cleanups and typos fixes

2016-03-02 Thread Felipe F. Tonello
Signed-off-by: Felipe F. Tonello 
---
 drivers/usb/gadget/function/f_midi.c | 77 +++-
 1 file changed, 40 insertions(+), 37 deletions(-)

diff --git a/drivers/usb/gadget/function/f_midi.c 
b/drivers/usb/gadget/function/f_midi.c
index 8475e3dc82d4..9a9e6112e224 100644
--- a/drivers/usb/gadget/function/f_midi.c
+++ b/drivers/usb/gadget/function/f_midi.c
@@ -1,5 +1,5 @@
 /*
- * f_midi.c -- USB MIDI class function driver
+ * f_midi.c -- USB-MIDI class function driver
  *
  * Copyright (C) 2006 Thumtronics Pty Ltd.
  * Developed for Thumtronics by Grey Innovation
@@ -16,7 +16,7 @@
  *   Copyright (C) 2006 Thumtronics Pty Ltd.
  *   Ben Williamson 
  *
- * Licensed under the GPL-2 or later.
+ * Licensed under the GPLv2.
  */
 
 #include 
@@ -41,8 +41,8 @@
 MODULE_AUTHOR("Ben Williamson");
 MODULE_LICENSE("GPL v2");
 
-static const char f_midi_shortname[] = "f_midi";
-static const char f_midi_longname[] = "MIDI Gadget";
+static const char f_midi_shortname[] = "f_midi";
+static const char f_midi_longname[] =  "MIDI Gadget";
 
 /*
  * We can only handle 16 cables on one single endpoint, as cable numbers are
@@ -78,28 +78,31 @@ struct gmidi_in_port {
 };
 
 struct f_midi {
-   struct usb_function func;
-   struct usb_gadget   *gadget;
-   struct usb_ep   *in_ep, *out_ep;
-   struct snd_card *card;
-   struct snd_rawmidi  *rmidi;
-   u8  ms_id;
-
-   struct snd_rawmidi_substream *out_substream[MAX_PORTS];
-
-   unsigned long   out_triggered;
-   struct tasklet_struct   tasklet;
+   struct usb_function func;
+   struct usb_gadget *gadget;
+   struct usb_ep *in_ep, *out_ep;
+   u8 ms_id;
+   unsigned long out_triggered;
unsigned int in_ports;
unsigned int out_ports;
-   int index;
-   char *id;
-   unsigned int buflen, qlen;
+   unsigned int buflen;
+   unsigned int qlen;
+   unsigned int len;
+
/* This fifo is used as a buffer ring for pre-allocated IN usb_requests 
*/
DECLARE_KFIFO_PTR(in_req_fifo, struct usb_request *);
spinlock_t transmit_lock;
+
+   /* ALSA stuff */
+   struct snd_card *card;
+   struct snd_rawmidi *rmidi;
+   struct snd_rawmidi_substream *out_substream[MAX_PORTS];
+   struct tasklet_struct tasklet;
unsigned int in_last_port;
+   int index;
+   char *id;
 
-   struct gmidi_in_portin_ports_array[/* in_ports */];
+   struct gmidi_in_port in_ports_array[/* in_ports */];
 };
 
 static inline struct f_midi *func_to_midi(struct usb_function *f)
@@ -191,7 +194,7 @@ static struct usb_ms_endpoint_descriptor_16 ms_in_desc = {
 
 /* string IDs are assigned dynamically */
 
-#define STRING_FUNC_IDX0
+#define STRING_FUNC_IDX 0
 
 static struct usb_string midi_string_defs[] = {
[STRING_FUNC_IDX].s = "MIDI function",
@@ -199,7 +202,7 @@ static struct usb_string midi_string_defs[] = {
 };
 
 static struct usb_gadget_strings midi_stringtab = {
-   .language   = 0x0409,   /* en-us */
+   .language   = 0x0409, /* en-us */
.strings= midi_string_defs,
 };
 
@@ -409,7 +412,7 @@ static int f_midi_snd_free(struct snd_device *device)
 }
 
 /*
- * Converts MIDI commands to USB MIDI packets.
+ * Converts MIDI commands to USB-MIDI packets.
  */
 static void f_midi_transmit_byte(struct usb_request *req,
 struct gmidi_in_port *port, uint8_t b)
@@ -956,15 +959,15 @@ static int f_midi_bind(struct usb_configuration *c, 
struct usb_function *f)
in_emb->iJack   = 0;
midi_function[i++] = (struct usb_descriptor_header *) in_emb;
 
-   out_ext->bLength =  USB_DT_MIDI_OUT_SIZE(1);
-   out_ext->bDescriptorType =  USB_DT_CS_INTERFACE;
-   out_ext->bDescriptorSubtype =   USB_MS_MIDI_OUT_JACK;
-   out_ext->bJackType =USB_MS_EXTERNAL;
-   out_ext->bJackID =  jack++;
-   out_ext->bNrInputPins = 1;
-   out_ext->iJack =0;
-   out_ext->pins[0].baSourceID =   in_emb->bJackID;
-   out_ext->pins[0].baSourcePin =  1;
+   out_ext->bLength= USB_DT_MIDI_OUT_SIZE(1);
+   out_ext->bDescriptorType= USB_DT_CS_INTERFACE;
+   out_ext->bDescriptorSubtype = USB_MS_MIDI_OUT_JACK;
+   out_ext->bJackType  = USB_MS_EXTERNAL;
+   out_ext->bJackID= jack++;
+   out_ext->bNrInputPins   = 1;
+   out_ext->iJack  = 0;
+   out_ext->pins[0].baSourceID = in_emb->bJackID;
+   out_ext->pins[0].baSourcePin= 1;
midi_function[i++] = (struct 

[PATCH 4/5] usb: gadget: f_midi: cleanups and typos fixes

2016-03-02 Thread Felipe F. Tonello
Signed-off-by: Felipe F. Tonello 
---
 drivers/usb/gadget/function/f_midi.c | 77 +++-
 1 file changed, 40 insertions(+), 37 deletions(-)

diff --git a/drivers/usb/gadget/function/f_midi.c 
b/drivers/usb/gadget/function/f_midi.c
index 8475e3dc82d4..9a9e6112e224 100644
--- a/drivers/usb/gadget/function/f_midi.c
+++ b/drivers/usb/gadget/function/f_midi.c
@@ -1,5 +1,5 @@
 /*
- * f_midi.c -- USB MIDI class function driver
+ * f_midi.c -- USB-MIDI class function driver
  *
  * Copyright (C) 2006 Thumtronics Pty Ltd.
  * Developed for Thumtronics by Grey Innovation
@@ -16,7 +16,7 @@
  *   Copyright (C) 2006 Thumtronics Pty Ltd.
  *   Ben Williamson 
  *
- * Licensed under the GPL-2 or later.
+ * Licensed under the GPLv2.
  */
 
 #include 
@@ -41,8 +41,8 @@
 MODULE_AUTHOR("Ben Williamson");
 MODULE_LICENSE("GPL v2");
 
-static const char f_midi_shortname[] = "f_midi";
-static const char f_midi_longname[] = "MIDI Gadget";
+static const char f_midi_shortname[] = "f_midi";
+static const char f_midi_longname[] =  "MIDI Gadget";
 
 /*
  * We can only handle 16 cables on one single endpoint, as cable numbers are
@@ -78,28 +78,31 @@ struct gmidi_in_port {
 };
 
 struct f_midi {
-   struct usb_function func;
-   struct usb_gadget   *gadget;
-   struct usb_ep   *in_ep, *out_ep;
-   struct snd_card *card;
-   struct snd_rawmidi  *rmidi;
-   u8  ms_id;
-
-   struct snd_rawmidi_substream *out_substream[MAX_PORTS];
-
-   unsigned long   out_triggered;
-   struct tasklet_struct   tasklet;
+   struct usb_function func;
+   struct usb_gadget *gadget;
+   struct usb_ep *in_ep, *out_ep;
+   u8 ms_id;
+   unsigned long out_triggered;
unsigned int in_ports;
unsigned int out_ports;
-   int index;
-   char *id;
-   unsigned int buflen, qlen;
+   unsigned int buflen;
+   unsigned int qlen;
+   unsigned int len;
+
/* This fifo is used as a buffer ring for pre-allocated IN usb_requests 
*/
DECLARE_KFIFO_PTR(in_req_fifo, struct usb_request *);
spinlock_t transmit_lock;
+
+   /* ALSA stuff */
+   struct snd_card *card;
+   struct snd_rawmidi *rmidi;
+   struct snd_rawmidi_substream *out_substream[MAX_PORTS];
+   struct tasklet_struct tasklet;
unsigned int in_last_port;
+   int index;
+   char *id;
 
-   struct gmidi_in_portin_ports_array[/* in_ports */];
+   struct gmidi_in_port in_ports_array[/* in_ports */];
 };
 
 static inline struct f_midi *func_to_midi(struct usb_function *f)
@@ -191,7 +194,7 @@ static struct usb_ms_endpoint_descriptor_16 ms_in_desc = {
 
 /* string IDs are assigned dynamically */
 
-#define STRING_FUNC_IDX0
+#define STRING_FUNC_IDX 0
 
 static struct usb_string midi_string_defs[] = {
[STRING_FUNC_IDX].s = "MIDI function",
@@ -199,7 +202,7 @@ static struct usb_string midi_string_defs[] = {
 };
 
 static struct usb_gadget_strings midi_stringtab = {
-   .language   = 0x0409,   /* en-us */
+   .language   = 0x0409, /* en-us */
.strings= midi_string_defs,
 };
 
@@ -409,7 +412,7 @@ static int f_midi_snd_free(struct snd_device *device)
 }
 
 /*
- * Converts MIDI commands to USB MIDI packets.
+ * Converts MIDI commands to USB-MIDI packets.
  */
 static void f_midi_transmit_byte(struct usb_request *req,
 struct gmidi_in_port *port, uint8_t b)
@@ -956,15 +959,15 @@ static int f_midi_bind(struct usb_configuration *c, 
struct usb_function *f)
in_emb->iJack   = 0;
midi_function[i++] = (struct usb_descriptor_header *) in_emb;
 
-   out_ext->bLength =  USB_DT_MIDI_OUT_SIZE(1);
-   out_ext->bDescriptorType =  USB_DT_CS_INTERFACE;
-   out_ext->bDescriptorSubtype =   USB_MS_MIDI_OUT_JACK;
-   out_ext->bJackType =USB_MS_EXTERNAL;
-   out_ext->bJackID =  jack++;
-   out_ext->bNrInputPins = 1;
-   out_ext->iJack =0;
-   out_ext->pins[0].baSourceID =   in_emb->bJackID;
-   out_ext->pins[0].baSourcePin =  1;
+   out_ext->bLength= USB_DT_MIDI_OUT_SIZE(1);
+   out_ext->bDescriptorType= USB_DT_CS_INTERFACE;
+   out_ext->bDescriptorSubtype = USB_MS_MIDI_OUT_JACK;
+   out_ext->bJackType  = USB_MS_EXTERNAL;
+   out_ext->bJackID= jack++;
+   out_ext->bNrInputPins   = 1;
+   out_ext->iJack  = 0;
+   out_ext->pins[0].baSourceID = in_emb->bJackID;
+   out_ext->pins[0].baSourcePin= 1;
midi_function[i++] = (struct usb_descriptor_header *) out_ext;
 
/* link it