2024-02-17 21:13:36

by Moritz C. Weber

[permalink] [raw]
Subject: [PATCH v2 0/8] Staging: vc04_services: bcm2835-camera: Fix code style checks

Resubmit these patches to fix multiple code style checks for better readability, consistency, and to address errors indicated by Gregs patch bot

Moritz C. Weber (8):
Staging: vc04_services: bcm2835-camera: fix brace code style check
Staging: vc04_services: bcm2835-camera: fix brace code style check
Staging: vc04_services: bcm2835-camera: fix brace code style check
Staging: vc04_services: bcm2835-camera: fix brace code style check
Staging: vc04_services: bcm2835-camera: fix brace code style check
Staging: vc04_services: bcm2835-camera: fix blank line style check
Staging: vc04_services: bcm2835-camera: fix brace code style check
Staging: vc04_services: bcm2835-camera: fix brace code style check

.../bcm2835-camera/bcm2835-camera.c | 61 +++++++++----------
1 file changed, 28 insertions(+), 33 deletions(-)

--
2.30.2



2024-02-17 21:13:49

by Moritz C. Weber

[permalink] [raw]
Subject: [PATCH v2 1/8] Staging: vc04_services: bcm2835-camera: fix brace code style check

Reformat function parameters to fix checkpatch check:
Increase readability and consistency

Signed-off-by: Moritz C. Weber <[email protected]>
---
.../vc04_services/bcm2835-camera/bcm2835-camera.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
index e6e89784d..05e5e4ab1 100644
--- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
+++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
@@ -350,12 +350,11 @@ static void buffer_cb(struct vchiq_mmal_instance *instance,
if (is_capturing(dev)) {
v4l2_dbg(1, bcm2835_v4l2_debug, &dev->v4l2_dev,
"Grab another frame");
- vchiq_mmal_port_parameter_set(
- instance,
- dev->capture.camera_port,
- MMAL_PARAMETER_CAPTURE,
- &dev->capture.frame_count,
- sizeof(dev->capture.frame_count));
+ vchiq_mmal_port_parameter_set(instance,
+ dev->capture.camera_port,
+ MMAL_PARAMETER_CAPTURE,
+ &dev->capture.frame_count,
+ sizeof(dev->capture.frame_count));
}
if (vchiq_mmal_submit_buffer(instance, port,
&buf->mmal))
--
2.30.2


2024-02-17 21:13:54

by Moritz C. Weber

[permalink] [raw]
Subject: [PATCH v2 2/8] Staging: vc04_services: bcm2835-camera: fix brace code style check

Reformat function parameters to fix checkpatch check:
Increase readability and consistency

Signed-off-by: Moritz C. Weber <[email protected]>
---
.../vc04_services/bcm2835-camera/bcm2835-camera.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
index 05e5e4ab1..1fa868163 100644
--- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
+++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
@@ -405,12 +405,11 @@ static void buffer_cb(struct vchiq_mmal_instance *instance,
is_capturing(dev)) {
v4l2_dbg(1, bcm2835_v4l2_debug, &dev->v4l2_dev,
"Grab another frame as buffer has EOS");
- vchiq_mmal_port_parameter_set(
- instance,
- dev->capture.camera_port,
- MMAL_PARAMETER_CAPTURE,
- &dev->capture.frame_count,
- sizeof(dev->capture.frame_count));
+ vchiq_mmal_port_parameter_set(instance,
+ dev->capture.camera_port,
+ MMAL_PARAMETER_CAPTURE,
+ &dev->capture.frame_count,
+ sizeof(dev->capture.frame_count));
}
}

--
2.30.2


2024-02-17 21:14:02

by Moritz C. Weber

[permalink] [raw]
Subject: [PATCH v2 3/8] Staging: vc04_services: bcm2835-camera: fix brace code style check

Reformat function parameters to fix checkpatch check:
Increase readability and consistency

Signed-off-by: Moritz C. Weber <[email protected]>
---
.../vc04_services/bcm2835-camera/bcm2835-camera.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
index 1fa868163..dfa9e7670 100644
--- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
+++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
@@ -418,11 +418,10 @@ static int enable_camera(struct bcm2835_mmal_dev *dev)
int ret;

if (!dev->camera_use_count) {
- ret = vchiq_mmal_port_parameter_set(
- dev->instance,
- &dev->component[COMP_CAMERA]->control,
- MMAL_PARAMETER_CAMERA_NUM, &dev->camera_num,
- sizeof(dev->camera_num));
+ ret = vchiq_mmal_port_parameter_set(dev->instance,
+ &dev->component[COMP_CAMERA]->control,
+ MMAL_PARAMETER_CAMERA_NUM, &dev->camera_num,
+ sizeof(dev->camera_num));
if (ret < 0) {
v4l2_err(&dev->v4l2_dev,
"Failed setting camera num, ret %d\n", ret);
--
2.30.2


2024-02-17 21:14:11

by Moritz C. Weber

[permalink] [raw]
Subject: [PATCH v2 4/8] Staging: vc04_services: bcm2835-camera: fix brace code style check

Reformat function parameters to fix checkpatch check:
Increase readability and consistency

Signed-off-by: Moritz C. Weber <[email protected]>
---
.../vc04_services/bcm2835-camera/bcm2835-camera.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
index dfa9e7670..e2d058732 100644
--- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
+++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
@@ -465,11 +465,11 @@ static int disable_camera(struct bcm2835_mmal_dev *dev)
"Failed disabling camera, ret %d\n", ret);
return -EINVAL;
}
- vchiq_mmal_port_parameter_set(
- dev->instance,
- &dev->component[COMP_CAMERA]->control,
- MMAL_PARAMETER_CAMERA_NUM, &i,
- sizeof(i));
+ vchiq_mmal_port_parameter_set(dev->instance,
+ &dev->component[COMP_CAMERA]->control,
+ MMAL_PARAMETER_CAMERA_NUM,
+ &i,
+ sizeof(i));
}
v4l2_dbg(1, bcm2835_v4l2_debug, &dev->v4l2_dev,
"Camera refcount now %d\n", dev->camera_use_count);
--
2.30.2


2024-02-17 21:14:19

by Moritz C. Weber

[permalink] [raw]
Subject: [PATCH v2 5/8] Staging: vc04_services: bcm2835-camera: fix brace code style check

Reformat function parameters to fix checkpatch check:
Increase readability and consistency

Signed-off-by: Moritz C. Weber <[email protected]>
---
.../staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
index e2d058732..b9745bb80 100644
--- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
+++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
@@ -783,9 +783,8 @@ static int vidioc_overlay(struct file *file, void *f, unsigned int on)
ret = vchiq_mmal_port_connect_tunnel(dev->instance, src,
NULL);
if (ret >= 0)
- ret = vchiq_mmal_component_disable(
- dev->instance,
- dev->component[COMP_PREVIEW]);
+ ret = vchiq_mmal_component_disable(dev->instance,
+ dev->component[COMP_PREVIEW]);

disable_camera(dev);
return ret;
--
2.30.2


2024-02-17 21:14:34

by Moritz C. Weber

[permalink] [raw]
Subject: [PATCH v2 6/8] Staging: vc04_services: bcm2835-camera: fix blank line style check

Remove blank line to fix checkpatch check:
Increase readability and consistency

Signed-off-by: Moritz C. Weber <[email protected]>
---
drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
index b9745bb80..a25a361c8 100644
--- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
+++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
@@ -1002,7 +1002,6 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
return 0;
}

-
static int mmal_setup_video_component(struct bcm2835_mmal_dev *dev,
struct v4l2_format *f)
{
--
2.30.2


2024-02-17 21:14:58

by Moritz C. Weber

[permalink] [raw]
Subject: [PATCH v2 8/8] Staging: vc04_services: bcm2835-camera: fix brace code style check

Reformat function parameters to fix checkpatch check:
Increase readability and consistency

Signed-off-by: Moritz C. Weber <[email protected]>
---
.../vc04_services/bcm2835-camera/bcm2835-camera.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
index 9cd79850b..c3ba490e5 100644
--- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
+++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
@@ -1715,11 +1715,11 @@ static int mmal_init(struct bcm2835_mmal_dev *dev)
{
unsigned int enable = 1;

- vchiq_mmal_port_parameter_set(
- dev->instance,
- &dev->component[COMP_VIDEO_ENCODE]->control,
- MMAL_PARAMETER_VIDEO_IMMUTABLE_INPUT,
- &enable, sizeof(enable));
+ vchiq_mmal_port_parameter_set(dev->instance,
+ &dev->component[COMP_VIDEO_ENCODE]->control,
+ MMAL_PARAMETER_VIDEO_IMMUTABLE_INPUT,
+ &enable,
+ sizeof(enable));

vchiq_mmal_port_parameter_set(dev->instance,
&dev->component[COMP_VIDEO_ENCODE]->control,
--
2.30.2


2024-02-17 21:15:02

by Moritz C. Weber

[permalink] [raw]
Subject: [PATCH v2 7/8] Staging: vc04_services: bcm2835-camera: fix brace code style check

Reformat function parameters to fix checkpatch check:
Increase readability and consistency

Signed-off-by: Moritz C. Weber <[email protected]>
---
drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
index a25a361c8..9cd79850b 100644
--- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
+++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
@@ -1037,8 +1037,8 @@ static int mmal_setup_video_component(struct bcm2835_mmal_dev *dev,

if (overlay_enabled) {
ret = vchiq_mmal_port_connect_tunnel(dev->instance,
- preview_port,
- &dev->component[COMP_PREVIEW]->input[0]);
+ preview_port,
+ &dev->component[COMP_PREVIEW]->input[0]);
if (ret)
return ret;

--
2.30.2


2024-02-19 07:38:53

by Dan Carpenter

[permalink] [raw]
Subject: Re: [PATCH v2 0/8] Staging: vc04_services: bcm2835-camera: Fix code style checks

On Sat, Feb 17, 2024 at 10:12:38PM +0100, Moritz C. Weber wrote:
> Resubmit these patches to fix multiple code style checks for better readability, consistency, and to address errors indicated by Gregs patch bot
>
> Moritz C. Weber (8):
> Staging: vc04_services: bcm2835-camera: fix brace code style check
> Staging: vc04_services: bcm2835-camera: fix brace code style check
> Staging: vc04_services: bcm2835-camera: fix brace code style check
> Staging: vc04_services: bcm2835-camera: fix brace code style check
> Staging: vc04_services: bcm2835-camera: fix brace code style check
> Staging: vc04_services: bcm2835-camera: fix blank line style check
> Staging: vc04_services: bcm2835-camera: fix brace code style check
> Staging: vc04_services: bcm2835-camera: fix brace code style check

These are automatically rejected because you sent 8 patches with the
same subject. But really they should just be one patch. In v1 Greg
complained that you were changing a bunch of random stuff. It's not
clear what was going on there because it was random text and there was
no way it would compile.

Was it an AI generated patch or what one earth happened?

Anyway, that was the issue, not that you need to break up the patch line
by line and send each line as a separate patch.

regards,
dan carpenter



2024-02-19 08:17:53

by Dan Carpenter

[permalink] [raw]
Subject: Re: [PATCH v2 0/8] Staging: vc04_services: bcm2835-camera: Fix code style checks

On Mon, Feb 19, 2024 at 10:38:30AM +0300, Dan Carpenter wrote:
> On Sat, Feb 17, 2024 at 10:12:38PM +0100, Moritz C. Weber wrote:
> > Resubmit these patches to fix multiple code style checks for better readability, consistency, and to address errors indicated by Gregs patch bot
> >
> > Moritz C. Weber (8):
> > Staging: vc04_services: bcm2835-camera: fix brace code style check
> > Staging: vc04_services: bcm2835-camera: fix brace code style check
> > Staging: vc04_services: bcm2835-camera: fix brace code style check
> > Staging: vc04_services: bcm2835-camera: fix brace code style check
> > Staging: vc04_services: bcm2835-camera: fix brace code style check
> > Staging: vc04_services: bcm2835-camera: fix blank line style check

This blank line patch would be still separate of course.

> > Staging: vc04_services: bcm2835-camera: fix brace code style check
> > Staging: vc04_services: bcm2835-camera: fix brace code style check

regards,
dan carpenter


2024-02-19 09:23:32

by Moritz C. Weber

[permalink] [raw]
Subject: Re: [PATCH v2 0/8] Staging: vc04_services: bcm2835-camera: Fix code style checks

Ok.. thanks for the explanation. Did not want to ask back stupidly
what the script was actually complaining about without providing a
suggestion on what I understood what it was asking for. I will submit
a version 3 patch for the braces and a separate blank line patch with
both good cover letters.

Best regards,
Moritz

On Mon, Feb 19, 2024 at 9:17 AM Dan Carpenter <dan.carpenter@linaroorg> wrote:
>
> On Mon, Feb 19, 2024 at 10:38:30AM +0300, Dan Carpenter wrote:
> > On Sat, Feb 17, 2024 at 10:12:38PM +0100, Moritz C. Weber wrote:
> > > Resubmit these patches to fix multiple code style checks for better readability, consistency, and to address errors indicated by Gregs patch bot
> > >
> > > Moritz C. Weber (8):
> > > Staging: vc04_services: bcm2835-camera: fix brace code style check
> > > Staging: vc04_services: bcm2835-camera: fix brace code style check
> > > Staging: vc04_services: bcm2835-camera: fix brace code style check
> > > Staging: vc04_services: bcm2835-camera: fix brace code style check
> > > Staging: vc04_services: bcm2835-camera: fix brace code style check
> > > Staging: vc04_services: bcm2835-camera: fix blank line style check
>
> This blank line patch would be still separate of course.
>
> > > Staging: vc04_services: bcm2835-camera: fix brace code style check
> > > Staging: vc04_services: bcm2835-camera: fix brace code style check
>
> regards,
> dan carpenter
>

2024-02-19 11:34:57

by Moritz C. Weber

[permalink] [raw]
Subject: [PATCH v3 0/2] Staging: vc04_services: bcm2835-camera: Fix code style checks

Resubmit these patches to address comments to rebase the 8 v2 changes into
2 patches topicwise
Fix patches with same subject issue based on v2, which fixes multiple code
style checks for better readability, consistency, and fixes typos from v1

Moritz C. Weber (2):
Staging: vc04_services: bcm2835-camera: fix blank line style check
Staging: vc04_services: bcm2835-camera: fix brace code style check

.../bcm2835-camera/bcm2835-camera.c | 61 +++++++++----------
1 file changed, 28 insertions(+), 33 deletions(-)

--
2.30.2


2024-02-19 11:35:09

by Moritz C. Weber

[permalink] [raw]
Subject: [PATCH v3 1/2] Staging: vc04_services: bcm2835-camera: fix blank line style check

Remove blank line to fix checkpatch check:
Increase readability and consistency

Signed-off-by: Moritz C. Weber <[email protected]>
---
drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
index e6e89784d..e6ff5ea04 100644
--- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
+++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
@@ -1006,7 +1006,6 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
return 0;
}

-
static int mmal_setup_video_component(struct bcm2835_mmal_dev *dev,
struct v4l2_format *f)
{
--
2.30.2


2024-02-19 12:33:43

by Dan Carpenter

[permalink] [raw]
Subject: Re: [PATCH v3 0/2] Staging: vc04_services: bcm2835-camera: Fix code style checks

On Mon, Feb 19, 2024 at 12:22:32PM +0100, Moritz C. Weber wrote:
> Resubmit these patches to address comments to rebase the 8 v2 changes into
> 2 patches topicwise
> Fix patches with same subject issue based on v2, which fixes multiple code
> style checks for better readability, consistency, and fixes typos from v1
>
> Moritz C. Weber (2):
> Staging: vc04_services: bcm2835-camera: fix blank line style check
> Staging: vc04_services: bcm2835-camera: fix brace code style check
>

Looks okay now.

Reviewed-by: Dan Carpenter <[email protected]>

regards,
dan carpenter