[v2,1/3] media: uvc_driver: fix missing newline after declarations

Message ID 20221025050450.1743072-1-pedro.guilherme@espectro.eng.br
State New
Headers
Series [v2,1/3] media: uvc_driver: fix missing newline after declarations |

Commit Message

Pedro Guilherme Siqueira Moreira Oct. 25, 2022, 5:04 a.m. UTC
  Fixes 'Missing a blank line after declarations' warning issued by
scripts/checkpatch.pl on drivers/media/usb/uvc/uvc_driver.c

Signed-off-by: Pedro Guilherme Siqueira Moreira <pedro.guilherme@espectro.eng.br>
---
 drivers/media/usb/uvc/uvc_driver.c | 4 ++++
 1 file changed, 4 insertions(+)
  

Comments

Laurent Pinchart Oct. 25, 2022, 6:50 p.m. UTC | #1
Hi Pedro,

Thank you for the patch.

On Tue, Oct 25, 2022 at 02:04:48AM -0300, Pedro Guilherme Siqueira Moreira wrote:
> Fixes 'Missing a blank line after declarations' warning issued by
> scripts/checkpatch.pl on drivers/media/usb/uvc/uvc_driver.c
> 
> Signed-off-by: Pedro Guilherme Siqueira Moreira <pedro.guilherme@espectro.eng.br>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/media/usb/uvc/uvc_driver.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
> index 215fb483efb0..b591ad823c66 100644
> --- a/drivers/media/usb/uvc/uvc_driver.c
> +++ b/drivers/media/usb/uvc/uvc_driver.c
> @@ -732,6 +732,7 @@ static int uvc_parse_streaming(struct uvc_device *dev,
>  	/* Parse the alternate settings to find the maximum bandwidth. */
>  	for (i = 0; i < intf->num_altsetting; ++i) {
>  		struct usb_host_endpoint *ep;
> +
>  		alts = &intf->altsetting[i];
>  		ep = uvc_find_endpoint(alts,
>  				streaming->header.bEndpointAddress);
> @@ -1859,12 +1860,14 @@ static void uvc_delete(struct kref *kref)
>  
>  	list_for_each_safe(p, n, &dev->chains) {
>  		struct uvc_video_chain *chain;
> +
>  		chain = list_entry(p, struct uvc_video_chain, list);
>  		kfree(chain);
>  	}
>  
>  	list_for_each_safe(p, n, &dev->entities) {
>  		struct uvc_entity *entity;
> +
>  		entity = list_entry(p, struct uvc_entity, list);
>  #ifdef CONFIG_MEDIA_CONTROLLER
>  		uvc_mc_cleanup_entity(entity);
> @@ -1874,6 +1877,7 @@ static void uvc_delete(struct kref *kref)
>  
>  	list_for_each_safe(p, n, &dev->streams) {
>  		struct uvc_streaming *streaming;
> +
>  		streaming = list_entry(p, struct uvc_streaming, list);
>  		usb_driver_release_interface(&uvc_driver.driver,
>  			streaming->intf);
  
Laurent Pinchart Oct. 25, 2022, 6:57 p.m. UTC | #2
I forgot to mention, the subject line should start with "media:
uvcvideo:", not "media: uvc_driver:". You can have a look at the git log
to see how subject lines are usually formatted for a driver or
subsystem.

No need to send a v3, I'll change this in my tree, for all three patches
in the series.

On Tue, Oct 25, 2022 at 09:51:03PM +0300, Laurent Pinchart wrote:
> Hi Pedro,
> 
> Thank you for the patch.
> 
> On Tue, Oct 25, 2022 at 02:04:48AM -0300, Pedro Guilherme Siqueira Moreira wrote:
> > Fixes 'Missing a blank line after declarations' warning issued by
> > scripts/checkpatch.pl on drivers/media/usb/uvc/uvc_driver.c
> > 
> > Signed-off-by: Pedro Guilherme Siqueira Moreira <pedro.guilherme@espectro.eng.br>
> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> 
> > ---
> >  drivers/media/usb/uvc/uvc_driver.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
> > index 215fb483efb0..b591ad823c66 100644
> > --- a/drivers/media/usb/uvc/uvc_driver.c
> > +++ b/drivers/media/usb/uvc/uvc_driver.c
> > @@ -732,6 +732,7 @@ static int uvc_parse_streaming(struct uvc_device *dev,
> >  	/* Parse the alternate settings to find the maximum bandwidth. */
> >  	for (i = 0; i < intf->num_altsetting; ++i) {
> >  		struct usb_host_endpoint *ep;
> > +
> >  		alts = &intf->altsetting[i];
> >  		ep = uvc_find_endpoint(alts,
> >  				streaming->header.bEndpointAddress);
> > @@ -1859,12 +1860,14 @@ static void uvc_delete(struct kref *kref)
> >  
> >  	list_for_each_safe(p, n, &dev->chains) {
> >  		struct uvc_video_chain *chain;
> > +
> >  		chain = list_entry(p, struct uvc_video_chain, list);
> >  		kfree(chain);
> >  	}
> >  
> >  	list_for_each_safe(p, n, &dev->entities) {
> >  		struct uvc_entity *entity;
> > +
> >  		entity = list_entry(p, struct uvc_entity, list);
> >  #ifdef CONFIG_MEDIA_CONTROLLER
> >  		uvc_mc_cleanup_entity(entity);
> > @@ -1874,6 +1877,7 @@ static void uvc_delete(struct kref *kref)
> >  
> >  	list_for_each_safe(p, n, &dev->streams) {
> >  		struct uvc_streaming *streaming;
> > +
> >  		streaming = list_entry(p, struct uvc_streaming, list);
> >  		usb_driver_release_interface(&uvc_driver.driver,
> >  			streaming->intf);
  
Pedro Guilherme Siqueira Moreira Oct. 25, 2022, 7:48 p.m. UTC | #3
Hi Laurent,

Thank you for the info and for accepting my patch!  I'll better revise 
the subject lines from now on.

On 25/10/2022 15:57, Laurent Pinchart wrote:
> I forgot to mention, the subject line should start with "media:
> uvcvideo:", not "media: uvc_driver:". You can have a look at the git log
> to see how subject lines are usually formatted for a driver or
> subsystem.
> 
> No need to send a v3, I'll change this in my tree, for all three patches
> in the series.
> 
> On Tue, Oct 25, 2022 at 09:51:03PM +0300, Laurent Pinchart wrote:
>> Hi Pedro,
>>
>> Thank you for the patch.
>>
>> On Tue, Oct 25, 2022 at 02:04:48AM -0300, Pedro Guilherme Siqueira Moreira wrote:
>>> Fixes 'Missing a blank line after declarations' warning issued by
>>> scripts/checkpatch.pl on drivers/media/usb/uvc/uvc_driver.c
>>>
>>> Signed-off-by: Pedro Guilherme Siqueira Moreira <pedro.guilherme@espectro.eng.br>
>>
>> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>>
>>> ---
>>>   drivers/media/usb/uvc/uvc_driver.c | 4 ++++
>>>   1 file changed, 4 insertions(+)
>>>
>>> diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
>>> index 215fb483efb0..b591ad823c66 100644
>>> --- a/drivers/media/usb/uvc/uvc_driver.c
>>> +++ b/drivers/media/usb/uvc/uvc_driver.c
>>> @@ -732,6 +732,7 @@ static int uvc_parse_streaming(struct uvc_device *dev,
>>>   	/* Parse the alternate settings to find the maximum bandwidth. */
>>>   	for (i = 0; i < intf->num_altsetting; ++i) {
>>>   		struct usb_host_endpoint *ep;
>>> +
>>>   		alts = &intf->altsetting[i];
>>>   		ep = uvc_find_endpoint(alts,
>>>   				streaming->header.bEndpointAddress);
>>> @@ -1859,12 +1860,14 @@ static void uvc_delete(struct kref *kref)
>>>   
>>>   	list_for_each_safe(p, n, &dev->chains) {
>>>   		struct uvc_video_chain *chain;
>>> +
>>>   		chain = list_entry(p, struct uvc_video_chain, list);
>>>   		kfree(chain);
>>>   	}
>>>   
>>>   	list_for_each_safe(p, n, &dev->entities) {
>>>   		struct uvc_entity *entity;
>>> +
>>>   		entity = list_entry(p, struct uvc_entity, list);
>>>   #ifdef CONFIG_MEDIA_CONTROLLER
>>>   		uvc_mc_cleanup_entity(entity);
>>> @@ -1874,6 +1877,7 @@ static void uvc_delete(struct kref *kref)
>>>   
>>>   	list_for_each_safe(p, n, &dev->streams) {
>>>   		struct uvc_streaming *streaming;
>>> +
>>>   		streaming = list_entry(p, struct uvc_streaming, list);
>>>   		usb_driver_release_interface(&uvc_driver.driver,
>>>   			streaming->intf);
>
  

Patch

diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
index 215fb483efb0..b591ad823c66 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -732,6 +732,7 @@  static int uvc_parse_streaming(struct uvc_device *dev,
 	/* Parse the alternate settings to find the maximum bandwidth. */
 	for (i = 0; i < intf->num_altsetting; ++i) {
 		struct usb_host_endpoint *ep;
+
 		alts = &intf->altsetting[i];
 		ep = uvc_find_endpoint(alts,
 				streaming->header.bEndpointAddress);
@@ -1859,12 +1860,14 @@  static void uvc_delete(struct kref *kref)
 
 	list_for_each_safe(p, n, &dev->chains) {
 		struct uvc_video_chain *chain;
+
 		chain = list_entry(p, struct uvc_video_chain, list);
 		kfree(chain);
 	}
 
 	list_for_each_safe(p, n, &dev->entities) {
 		struct uvc_entity *entity;
+
 		entity = list_entry(p, struct uvc_entity, list);
 #ifdef CONFIG_MEDIA_CONTROLLER
 		uvc_mc_cleanup_entity(entity);
@@ -1874,6 +1877,7 @@  static void uvc_delete(struct kref *kref)
 
 	list_for_each_safe(p, n, &dev->streams) {
 		struct uvc_streaming *streaming;
+
 		streaming = list_entry(p, struct uvc_streaming, list);
 		usb_driver_release_interface(&uvc_driver.driver,
 			streaming->intf);