* [PATCH 1/2] staging: media: atomisp: pci: Correct identation in block of conditional statements in file atomisp_v4l2.c
[not found] <cover.1618409028.git.alinesantanacordeiro@gmail.com>
@ 2021-04-14 14:06 ` Aline Santana Cordeiro
2021-04-14 14:30 ` Dan Carpenter
2021-04-14 14:06 ` [PATCH 2/2] staging: media: atomisp: pci: Correct identation in block of conditional statements in file atomisp_acc.c Aline Santana Cordeiro
1 sibling, 1 reply; 7+ messages in thread
From: Aline Santana Cordeiro @ 2021-04-14 14:06 UTC (permalink / raw)
To: Mauro Carvalho Chehab, Sakari Ailus, Greg Kroah-Hartman
Cc: linux-media, linux-staging, linux-kernel, outreachy-kernel
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 <alinesantanacordeiro@gmail.com>
---
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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] staging: media: atomisp: pci: Correct identation in block of conditional statements in file atomisp_acc.c
[not found] <cover.1618409028.git.alinesantanacordeiro@gmail.com>
2021-04-14 14:06 ` [PATCH 1/2] staging: media: atomisp: pci: Correct identation in block of conditional statements in file atomisp_v4l2.c Aline Santana Cordeiro
@ 2021-04-14 14:06 ` Aline Santana Cordeiro
1 sibling, 0 replies; 7+ messages in thread
From: Aline Santana Cordeiro @ 2021-04-14 14:06 UTC (permalink / raw)
To: Mauro Carvalho Chehab, Sakari Ailus, Greg Kroah-Hartman
Cc: linux-media, linux-staging, linux-kernel, outreachy-kernel
Correct identation in block of conditional statements.
The conditional statement depends on the results of the
macro function "list_for_each_entry()".
Signed-off-by: Aline Santana Cordeiro <alinesantanacordeiro@gmail.com>
---
drivers/staging/media/atomisp/pci/atomisp_acc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/media/atomisp/pci/atomisp_acc.c b/drivers/staging/media/atomisp/pci/atomisp_acc.c
index f638d0b..5e5faa4 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_acc.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_acc.c
@@ -77,8 +77,8 @@ acc_get_fw(struct atomisp_sub_device *asd, unsigned int handle)
struct atomisp_acc_fw *acc_fw;
list_for_each_entry(acc_fw, &asd->acc.fw, list)
- if (acc_fw->handle == handle)
- return acc_fw;
+ if (acc_fw->handle == handle)
+ return acc_fw;
return NULL;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] staging: media: atomisp: pci: Correct identation in block of conditional statements in file atomisp_v4l2.c
2021-04-14 14:06 ` [PATCH 1/2] staging: media: atomisp: pci: Correct identation in block of conditional statements in file atomisp_v4l2.c Aline Santana Cordeiro
@ 2021-04-14 14:30 ` Dan Carpenter
2021-04-14 14:39 ` [Outreachy kernel] " Julia Lawall
2021-04-14 14:39 ` ascordeiro
0 siblings, 2 replies; 7+ messages in thread
From: Dan Carpenter @ 2021-04-14 14:30 UTC (permalink / raw)
To: Aline Santana Cordeiro
Cc: Mauro Carvalho Chehab, Sakari Ailus, Greg Kroah-Hartman,
linux-media, linux-staging, linux-kernel, outreachy-kernel
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 <alinesantanacordeiro@gmail.com>
> ---
> 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Outreachy kernel] Re: [PATCH 1/2] staging: media: atomisp: pci: Correct identation in block of conditional statements in file atomisp_v4l2.c
2021-04-14 14:30 ` Dan Carpenter
@ 2021-04-14 14:39 ` Julia Lawall
2021-04-14 14:45 ` Dan Carpenter
2021-04-14 14:39 ` ascordeiro
1 sibling, 1 reply; 7+ messages in thread
From: Julia Lawall @ 2021-04-14 14:39 UTC (permalink / raw)
To: Dan Carpenter
Cc: Aline Santana Cordeiro, Mauro Carvalho Chehab, Sakari Ailus,
Greg Kroah-Hartman, linux-media, linux-staging, linux-kernel,
outreachy-kernel
On Wed, 14 Apr 2021, Dan Carpenter wrote:
> 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 <alinesantanacordeiro@gmail.com>
> > ---
> > 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);
> }
A quick test with grep shows 4000 lines containing list_for_each that
contain no {, out of 15000 lines containing list_for_each in all.
julia
>
> regards,
> dan carpenter
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20210414143011.GV6021%40kadam.
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] staging: media: atomisp: pci: Correct identation in block of conditional statements in file atomisp_v4l2.c
2021-04-14 14:30 ` Dan Carpenter
2021-04-14 14:39 ` [Outreachy kernel] " Julia Lawall
@ 2021-04-14 14:39 ` ascordeiro
1 sibling, 0 replies; 7+ messages in thread
From: ascordeiro @ 2021-04-14 14:39 UTC (permalink / raw)
To: Dan Carpenter
Cc: Mauro Carvalho Chehab, Sakari Ailus, Greg Kroah-Hartman,
linux-media, linux-staging, linux-kernel, outreachy-kernel
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 <
> > alinesantanacordeiro@gmail.com>
> > ---
> > 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Outreachy kernel] Re: [PATCH 1/2] staging: media: atomisp: pci: Correct identation in block of conditional statements in file atomisp_v4l2.c
2021-04-14 14:39 ` [Outreachy kernel] " Julia Lawall
@ 2021-04-14 14:45 ` Dan Carpenter
2021-04-14 14:51 ` ascordeiro
0 siblings, 1 reply; 7+ messages in thread
From: Dan Carpenter @ 2021-04-14 14:45 UTC (permalink / raw)
To: Julia Lawall
Cc: Aline Santana Cordeiro, Mauro Carvalho Chehab, Sakari Ailus,
Greg Kroah-Hartman, linux-media, linux-staging, linux-kernel,
outreachy-kernel
On Wed, Apr 14, 2021 at 04:39:20PM +0200, Julia Lawall wrote:
>
>
> On Wed, 14 Apr 2021, Dan Carpenter wrote:
>
> > 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 <alinesantanacordeiro@gmail.com>
> > > ---
> > > 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);
> > }
>
> A quick test with grep shows 4000 lines containing list_for_each that
> contain no {, out of 15000 lines containing list_for_each in all.
>
Huh... You're right. Never mind then.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Outreachy kernel] Re: [PATCH 1/2] staging: media: atomisp: pci: Correct identation in block of conditional statements in file atomisp_v4l2.c
2021-04-14 14:45 ` Dan Carpenter
@ 2021-04-14 14:51 ` ascordeiro
0 siblings, 0 replies; 7+ messages in thread
From: ascordeiro @ 2021-04-14 14:51 UTC (permalink / raw)
To: Dan Carpenter, Julia Lawall
Cc: Mauro Carvalho Chehab, Sakari Ailus, Greg Kroah-Hartman,
linux-media, linux-staging, linux-kernel, outreachy-kernel
Em qua, 2021-04-14 às 17:45 +0300, Dan Carpenter escreveu:
> On Wed, Apr 14, 2021 at 04:39:20PM +0200, Julia Lawall wrote:
> >
> >
> > On Wed, 14 Apr 2021, Dan Carpenter wrote:
> >
> > > 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 <
> > > > alinesantanacordeiro@gmail.com>
> > > > ---
> > > > 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);
> > > }
> >
> > A quick test with grep shows 4000 lines containing list_for_each
> > that
> > contain no {, out of 15000 lines containing list_for_each in all.
> >
>
> Huh... You're right. Never mind then.
>
> regards,
> dan carpenter
>
Ok then :)
Thank you all,
Aline
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-04-14 14:51 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <cover.1618409028.git.alinesantanacordeiro@gmail.com>
2021-04-14 14:06 ` [PATCH 1/2] staging: media: atomisp: pci: Correct identation in block of conditional statements in file atomisp_v4l2.c Aline Santana Cordeiro
2021-04-14 14:30 ` Dan Carpenter
2021-04-14 14:39 ` [Outreachy kernel] " Julia Lawall
2021-04-14 14:45 ` Dan Carpenter
2021-04-14 14:51 ` ascordeiro
2021-04-14 14:39 ` ascordeiro
2021-04-14 14:06 ` [PATCH 2/2] staging: media: atomisp: pci: Correct identation in block of conditional statements in file atomisp_acc.c Aline Santana Cordeiro
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).