Staging: vc04_services: bcm2835-camera: fixed several brace coding style checks
Subsystems (3)
PATCH 1/1 Staging: vc04_services: bcm2835-camera: fixed several brace coding style checks
Fixed coding style checks raised by checkpatch
--- .../bcm2835-camera/bcm2835-camera.c | 62 +++++++++---------- 1 file changed, 29 insertions(+), 33 deletions(-)
drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c +29 -33
@@ -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))
@@ -406,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 , + #N(#O(#O(#O(#O(&dev->capture.frame_count, +sizeof (dev->capture.frame_count)); } }
@@ -420,11 +418,11 @@ 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);
@@ -468,11 +466,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);
@@ -786,9 +784,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;
@@ -1006,7 +1003,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) {
@@ -1042,8 +1038,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;
@@ -1720,11 +1716,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,
Signature · 1 line
2.30.2
Greg KH
maintainerQuoted 6 lines · Moritz C. Weber
Fixed coding style checks raised by checkpatch
Signed-off-by Moritz C. Weber <[email protected]>--- .../bcm2835-camera/bcm2835-camera.c | 62 +++++++++---------- 1 file changed, 29 insertions(+), 33 deletions(-)
Hi,
This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree.
You are receiving this message because of the following common error(s) as indicated below:
- Your patch did many different things all at once, making it difficult to review. All Linux kernel patches need to only do one thing at a time. If you need to do multiple things (such as clean up all coding style issues in a file/driver), do it in a sequence of patches, each one doing only one thing. This will make it easier to review the patches to ensure that they are correct, and to help alleviate any merge issues that larger patches can cause.
- You did not specify a description of why the patch is needed, or possibly, any description at all, in the email body. Please read the section entitled "The canonical patch format" in the kernel file, Documentation/process/submitting-patches.rst for what is needed in order to properly describe the change.
If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers.
thanks,
greg k-h's patch email bot
Quoted 4 lines · Moritz C. Weber
drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c +0
-0@@ -406,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" );
drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c static void buffer_cb(struct vchiq_mmal_instance *instance, · line 411
Quoted 10 lines
drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c +4
-6-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, +#N (#O(#O(#O(#O(&dev->capture.frame_count,
^^^^^^^^^^^^^^^^
Wut?
Quoted 8 lines
drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c +1
-0+ sizeof(dev->capture.frame_count)); } }@@ -420,11 +418,11 @@ static int enable_camera(struct bcm2835_mmal_dev *dev)int ret;if (!dev->camera_use_count) {
drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c static int enable_camera(struct bcm2835_mmal_dev *dev) · line 425
Quoted 10 lines
drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c +5
-5- 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));
Also Wut???
regards,
dan carpenter
Hi Dan,
thank for highlighting this. I have redone, split and resubmitted the whole patch yesterday due to the issues Gregs patch bot raised. The patches build, are checkpatched and also survive a last look. The two issues that I introduced and which you raised have been not reproduced in the new submission.
Best regards,
Moritz
Quoted 45 lines · Dan Carpenter
Quoted 4 lines · Moritz C. Weber
drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c +0
-0@@ -406,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" );drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c static void buffer_cb(struct vchiq_mmal_instance *instance, · line 411
Quoted 10 lines
drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c +4
-6-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, +#N (#O(#O(#O(#O(&dev->capture.frame_count,^^^^^^^^^^^^^^^^Wut?
Quoted 8 lines
drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c +1
-0+ sizeof(dev->capture.frame_count)); } }@@ -420,11 +418,11 @@ static int enable_camera(struct bcm2835_mmal_dev *dev)int ret;if (!dev->camera_use_count) {drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c static int enable_camera(struct bcm2835_mmal_dev *dev) · line 425
Quoted 10 lines
drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c +5
-5- 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));Also Wut???
regards,
dan carpenter