Skip to contentSkip to conversation

media: staging/intel-ipu3: Reformat pointer initialization

PATCH Superseded Deepak R Varma 4 participants 7 messages Mar 22, 2020 – Mar 28, 2020

Subsystems (4)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 media: staging/intel-ipu3: Reformat pointer initialization

Reformat pointer initialization to make it more readable as per the coding standards. Problem detected by checkpatch.

---

Changes since v1:
- Correct commit message and description as advised vy Stefano. Its pointer initialization and not declaration as mentioned earlier.

 drivers/staging/media/ipu3/ipu3-v4l2.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/media/ipu3/ipu3-v4l2.c +3 -3
index 569e27b824c8..52826fad6f42 100644
@@ -485,7 +485,6 @@ static int imgu_vb2_start_streaming(struct vb2_queue *vq, unsigned int count)
 	if (r < 0)
 		goto fail_return_bufs;
 
-
 	if (!imgu_all_nodes_streaming(imgu, node))
 		return 0;
 
@@ -1013,8 +1012,9 @@ static const struct v4l2_ioctl_ops imgu_v4l2_meta_ioctl_ops = {
 
 static int imgu_sd_s_ctrl(struct v4l2_ctrl *ctrl)
 {
-	struct imgu_v4l2_subdev *imgu_sd =
-		container_of(ctrl->handler, struct imgu_v4l2_subdev, ctrl_handler);
+	struct imgu_v4l2_subdev *imgu_sd = container_of(ctrl->handler,
+							struct imgu_v4l2_subdev,
+							ctrl_handler);
 	struct imgu_device *imgu = v4l2_get_subdevdata(&imgu_sd->subdev);
 	struct device *dev = &imgu->pci_dev->dev;
 
Signature · 1 line
2.17.1
#1 lore raw
Quoted 18 lines · Deepak R Varma

Reformat pointer initialization to make it more readable as per the coding standards. Problem detected by checkpatch.

---

Changes since v1:
- Correct commit message and description as advised vy Stefano. Its pointer initialization and not declaration as mentioned earlier.

 drivers/staging/media/ipu3/ipu3-v4l2.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/media/ipu3/ipu3-v4l2.c +0 -0
index 569e27b824c8..52826fad6f42 100644

drivers/staging/media/ipu3/ipu3-v4l2.c static int imgu_vb2_start_streaming(struct vb2_queue *vq, unsigned int count) · line 488

Quoted 4 lines
drivers/staging/media/ipu3/ipu3-v4l2.c +0 -1
@@ -485,7 +485,6 @@ static int imgu_vb2_start_streaming(struct vb2_queue *vq, unsigned int count)
 	if (r < 0)
 		goto fail_return_bufs;
 
-

This change shouldn't be part of this patch.

julia

Quoted 23 lines
drivers/staging/media/ipu3/ipu3-v4l2.c +3 -3
 	if (!imgu_all_nodes_streaming(imgu, node))
 		return 0;
 
@@ -1013,8 +1012,9 @@ static const struct v4l2_ioctl_ops imgu_v4l2_meta_ioctl_ops = {
 
 static int imgu_sd_s_ctrl(struct v4l2_ctrl *ctrl)
 {
-	struct imgu_v4l2_subdev *imgu_sd =
-		container_of(ctrl->handler, struct imgu_v4l2_subdev, ctrl_handler);
+	struct imgu_v4l2_subdev *imgu_sd = container_of(ctrl->handler,
+							struct imgu_v4l2_subdev,
+							ctrl_handler);
 	struct imgu_device *imgu = v4l2_get_subdevdata(&imgu_sd->subdev);
 	struct device *dev = &imgu->pci_dev->dev;
 
--

2.17.1

--
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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20200322185350.GA12377%40deeUbuntu.

#2 lore raw
In reply to Deepak R Varma

drivers/staging/media/ipu3/ipu3-v4l2.c static const struct v4l2_ioctl_ops imgu_v4l2_meta_ioctl_ops = { · line 1017

Quoted 9 lines · Deepak R Varma

Reformat pointer initialization to make it more readable as per the coding standards. Problem detected by checkpatch.

drivers/staging/media/ipu3/ipu3-v4l2.c +3 -2
-       struct imgu_v4l2_subdev *imgu_sd =
-               container_of(ctrl->handler, struct imgu_v4l2_subdev, ctrl_handler);
+       struct imgu_v4l2_subdev *imgu_sd = container_of(ctrl->handler,
+                                                       struct imgu_v4l2_subdev,
+                                                       ctrl_handler);

I'm sorry I don't see benefit of this change, actually an opposite.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#3 lore raw
Quoted 5 lines · Andy Shevchenko
Quoted 3 lines · Deepak R Varma

Reformat pointer initialization to make it more readable as per the coding standards. Problem detected by checkpatch.

Quoted 7 lines

drivers/staging/media/ipu3/ipu3-v4l2.c static const struct v4l2_ioctl_ops imgu_v4l2_meta_ioctl_ops = { · line 1017

Quoted 5 lines
drivers/staging/media/ipu3/ipu3-v4l2.c +3 -2
-       struct imgu_v4l2_subdev *imgu_sd =
-               container_of(ctrl->handler, struct imgu_v4l2_subdev, ctrl_handler);
+       struct imgu_v4l2_subdev *imgu_sd = container_of(ctrl->handler,
+                                                       struct imgu_v4l2_subdev,
+                                                       ctrl_handler);

I'm sorry I don't see benefit of this change, actually an opposite.

Hello Andy,
Thank you for your comment. To me, it helps quickly and clearly spot *imgu_sd. Also the initialization looks more structured. But that's just me.

I will wait to see if anyone else wants to share their thoughts, and then circle back to you on next steps. Is that fine?

Deepak.

Quoted 4 lines
Signature · 3 lines
-- 
With Best Regards,
Andy Shevchenko
#4 lore raw

Adding Linux-media list as advised by Sakari Ailus.

Quoted 14 lines · DEEPAK VARMA
Quoted 5 lines · Andy Shevchenko
Quoted 3 lines · Deepak R Varma

Reformat pointer initialization to make it more readable as per the coding standards. Problem detected by checkpatch.

Quoted 7 lines

drivers/staging/media/ipu3/ipu3-v4l2.c static const struct v4l2_ioctl_ops imgu_v4l2_meta_ioctl_ops = { · line 1017

Quoted 5 lines
drivers/staging/media/ipu3/ipu3-v4l2.c +3 -2
-       struct imgu_v4l2_subdev *imgu_sd =
-               container_of(ctrl->handler, struct imgu_v4l2_subdev, ctrl_handler);
+       struct imgu_v4l2_subdev *imgu_sd = container_of(ctrl->handler,
+                                                       struct imgu_v4l2_subdev,
+                                                       ctrl_handler);

I'm sorry I don't see benefit of this change, actually an opposite.

Quoted 8 lines

Hello Andy,
Thank you for your comment. To me, it helps quickly and clearly spot *imgu_sd. Also the initialization looks more structured. But that's just me.

I will wait to see if anyone else wants to share their thoughts, and then circle back to you on next steps. Is that fine?

Hello Andy and all,
I have not seen any additional comments on this thread. Let me know if you approve the proposed change or want me to leave it as is.

Thank you,
Deepak.

Quoted 5 lines

Deepak.

Quoted 4 lines
Signature · 3 lines
-- 
With Best Regards,
Andy Shevchenko
maintainer
#5 lore raw
In reply to Deepak R Varma
Quoted 4 lines · On Mon, 23 Mar 2020 00:23:54 +0530 Deepak R Varma <[email protected]> wrote:

Reformat pointer initialization to make it more readable as per the coding standards. Problem detected by checkpatch.

Check your cc list before sending and make sure it makes sense. Driver has nothing to do with IIO and half your list are from IIO MAINTAINERS entry.

Quoted 33 lines

---

Changes since v1:
- Correct commit message and description as advised vy Stefano. Its pointer initialization and not declaration as mentioned earlier.

 drivers/staging/media/ipu3/ipu3-v4l2.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/media/ipu3/ipu3-v4l2.c +3 -3
index 569e27b824c8..52826fad6f42 100644
@@ -485,7 +485,6 @@ static int imgu_vb2_start_streaming(struct vb2_queue *vq, unsigned int count)
 	if (r < 0)
 		goto fail_return_bufs;
 
-
 	if (!imgu_all_nodes_streaming(imgu, node))
 		return 0;
 
@@ -1013,8 +1012,9 @@ static const struct v4l2_ioctl_ops imgu_v4l2_meta_ioctl_ops = {
 
 static int imgu_sd_s_ctrl(struct v4l2_ctrl *ctrl)
 {
-	struct imgu_v4l2_subdev *imgu_sd =
-		container_of(ctrl->handler, struct imgu_v4l2_subdev, ctrl_handler);
+	struct imgu_v4l2_subdev *imgu_sd = container_of(ctrl->handler,
+							struct imgu_v4l2_subdev,
+							ctrl_handler);
 	struct imgu_device *imgu = v4l2_get_subdevdata(&imgu_sd->subdev);
 	struct device *dev = &imgu->pci_dev->dev;
 
#6 lore raw
Quoted 11 lines · Jonathan Cameron
Quoted 4 lines · On Mon, 23 Mar 2020 00:23:54 +0530 Deepak R Varma <[email protected]> wrote:

Reformat pointer initialization to make it more readable as per the coding standards. Problem detected by checkpatch.

Check your cc list before sending and make sure it makes sense. Driver has nothing to do with IIO and half your list are from IIO MAINTAINERS entry.

Hi Jonathan,
My bad. Must be a copy paste error as I did a git rebase and must have gotten the wrong maintainers list from a different patch. I will correct and resend.

Thank you for pointing out,
Deepak.

Quoted 35 lines
Quoted 34 lines

---

Changes since v1:
- Correct commit message and description as advised vy Stefano. Its pointer initialization and not declaration as mentioned earlier.

 drivers/staging/media/ipu3/ipu3-v4l2.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/media/ipu3/ipu3-v4l2.c +3 -3
index 569e27b824c8..52826fad6f42 100644
@@ -485,7 +485,6 @@ static int imgu_vb2_start_streaming(struct vb2_queue *vq, unsigned int count)
 	if (r < 0)
 		goto fail_return_bufs;
 
-
 	if (!imgu_all_nodes_streaming(imgu, node))
 		return 0;
 
@@ -1013,8 +1012,9 @@ static const struct v4l2_ioctl_ops imgu_v4l2_meta_ioctl_ops = {
 
 static int imgu_sd_s_ctrl(struct v4l2_ctrl *ctrl)
 {
-	struct imgu_v4l2_subdev *imgu_sd =
-		container_of(ctrl->handler, struct imgu_v4l2_subdev, ctrl_handler);
+	struct imgu_v4l2_subdev *imgu_sd = container_of(ctrl->handler,
+							struct imgu_v4l2_subdev,
+							ctrl_handler);
 	struct imgu_device *imgu = v4l2_get_subdevdata(&imgu_sd->subdev);
 	struct device *dev = &imgu->pci_dev->dev;