2021-04-15 00:29:45

by Aline Santana Cordeiro

[permalink] [raw]
Subject: [PATCH 1/2] staging: media: atomisp: pci: Correct identation in block of conditional statements in file atomisp_v4l2.c

Correct identation in block of conditional statements.
The function "v4l2_device_unregister_subdev()" depends on
the results of the macro function "list_for_each_entry_safe()".

Signed-off-by: Aline Santana Cordeiro <[email protected]>
---
drivers/staging/media/atomisp/pci/atomisp_v4l2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
index 0295e2e..6d853f4 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
@@ -1178,7 +1178,7 @@ static void atomisp_unregister_entities(struct atomisp_device *isp)
atomisp_mipi_csi2_unregister_entities(&isp->csi2_port[i]);

list_for_each_entry_safe(sd, next, &isp->v4l2_dev.subdevs, list)
- v4l2_device_unregister_subdev(sd);
+ v4l2_device_unregister_subdev(sd);

v4l2_device_unregister(&isp->v4l2_dev);
media_device_unregister(&isp->media_dev);
--
2.7.4


2021-04-15 00:30:03

by Dan Carpenter

[permalink] [raw]
Subject: Re: [PATCH 1/2] staging: media: atomisp: pci: Correct identation in block of conditional statements in file atomisp_v4l2.c

On Wed, Apr 14, 2021 at 11:06:02AM -0300, Aline Santana Cordeiro wrote:
> Correct identation in block of conditional statements.
> The function "v4l2_device_unregister_subdev()" depends on
> the results of the macro function "list_for_each_entry_safe()".
>
> Signed-off-by: Aline Santana Cordeiro <[email protected]>
> ---
> drivers/staging/media/atomisp/pci/atomisp_v4l2.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
> index 0295e2e..6d853f4 100644
> --- a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
> +++ b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
> @@ -1178,7 +1178,7 @@ static void atomisp_unregister_entities(struct atomisp_device *isp)
> atomisp_mipi_csi2_unregister_entities(&isp->csi2_port[i]);
>
> list_for_each_entry_safe(sd, next, &isp->v4l2_dev.subdevs, list)
> - v4l2_device_unregister_subdev(sd);
> + v4l2_device_unregister_subdev(sd);
>

It's really more common to use curly braces for list_for_each() one
liners.

list_for_each_entry_safe(sd, next, &isp->v4l2_dev.subdevs, list) {
v4l2_device_unregister_subdev(sd);
}

regards,
dan carpenter

2021-04-15 00:30:56

by Aline Santana Cordeiro

[permalink] [raw]
Subject: Re: [PATCH 1/2] staging: media: atomisp: pci: Correct identation in block of conditional statements in file atomisp_v4l2.c

Em qua, 2021-04-14 às 17:30 +0300, Dan Carpenter escreveu:
> On Wed, Apr 14, 2021 at 11:06:02AM -0300, Aline Santana Cordeiro
> wrote:
> > Correct identation in block of conditional statements.
> > The function "v4l2_device_unregister_subdev()" depends on
> > the results of the macro function "list_for_each_entry_safe()".
> >
> > Signed-off-by: Aline Santana Cordeiro <
> > [email protected]>
> > ---
> >  drivers/staging/media/atomisp/pci/atomisp_v4l2.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
> > b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
> > index 0295e2e..6d853f4 100644
> > --- a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
> > +++ b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
> > @@ -1178,7 +1178,7 @@ static void
> > atomisp_unregister_entities(struct atomisp_device *isp)
> >                 atomisp_mipi_csi2_unregister_entities(&isp-
> > >csi2_port[i]);
> >  
> >         list_for_each_entry_safe(sd, next, &isp->v4l2_dev.subdevs,
> > list)
> > -       v4l2_device_unregister_subdev(sd);
> > +               v4l2_device_unregister_subdev(sd);
> >  
>
> It's really more common to use curly braces for list_for_each() one
> liners.
>
>         list_for_each_entry_safe(sd, next, &isp->v4l2_dev.subdevs,
> list) {
>                 v4l2_device_unregister_subdev(sd);
>         }
>
> regards,
> dan carpenter
>
Thank you for warning me.
I'm going to send a v2 adding the curly braces.

regards,
Aline