Message ID | 0ef18a36d6905628fa596fd5e0a32fdb9c6a8ada.1618409028.git.alinesantanacordeiro@gmail.com |
---|---|
State | Accepted |
Commit | bbbcba0267e2faff32c62905219f1d3b81f75d30 |
Headers | show |
Series | [1/2] staging: media: atomisp: pci: Correct identation in block of conditional statements in file atomisp_v4l2.c | expand |
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
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. >
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
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);
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(-)