Re: [Outreachy kernel] [PATCH 1/2] staging: vc04_services: fix lines ending with open parenthesis

2019-10-13 Thread Jules Irenge



On Sun, 13 Oct 2019, Julia Lawall wrote:

> 
> 
> On Sun, 13 Oct 2019, Jules Irenge wrote:
> 
> > Fix lines ending with open parenthesis. Issue detected by checkpatch tool.
> > In the process, change driver functions name in the multiple files from:
> > vchiq_mmal_port_parameter_set to vmp_prmtr_set
> > vchiq_mmal_component_disable to vm_cmpnt_disable
> > vchiq_mmal_port_connect_tunnel to vmp_cnnct_tunnel
> > vchiq_mmal_component_enable to vm_cmpnt_enable
> 
> You should say why you change the names.
> 
> As far as I can see, there is no change to the actual function
> definitions, so the code can't compile.  Perhaps that comes later in the
> series, but the elements of the series have to be ordered such that
> compilation is possible after each patch.
> 
> julia
> 

Thanks for the feedback, I am updating it and will be compiling  
each point.
Jules






Re: [Outreachy kernel] [PATCH 1/2] staging: vc04_services: fix lines ending with open parenthesis

2019-10-13 Thread Julia Lawall



On Sun, 13 Oct 2019, Jules Irenge wrote:

> Fix lines ending with open parenthesis. Issue detected by checkpatch tool.
> In the process, change driver functions name in the multiple files from:
> vchiq_mmal_port_parameter_set to vmp_prmtr_set
> vchiq_mmal_component_disable to vm_cmpnt_disable
> vchiq_mmal_port_connect_tunnel to vmp_cnnct_tunnel
> vchiq_mmal_component_enable to vm_cmpnt_enable

You should say why you change the names.

As far as I can see, there is no change to the actual function
definitions, so the code can't compile.  Perhaps that comes later in the
series, but the elements of the series have to be ordered such that
compilation is possible after each patch.

julia

>
> Signed-off-by: Jules Irenge 
> ---
>  .../bcm2835-camera/bcm2835-camera.c   | 191 --
>  1 file changed, 89 insertions(+), 102 deletions(-)
>
> diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c 
> b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
> index beb6a0063bb8..0ffe95b3bfb2 100644
> --- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
> +++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
> @@ -337,12 +337,11 @@ static void buffer_cb(struct vchiq_mmal_instance 
> *instance,
>   if (is_capturing(dev)) {
>   v4l2_dbg(1, bcm2835_v4l2_debug, >v4l2_dev,
>"Grab another frame");
> - vchiq_mmal_port_parameter_set(
> - instance,
> - dev->capture.camera_port,
> - MMAL_PARAMETER_CAPTURE,
> - >capture.frame_count,
> - sizeof(dev->capture.frame_count));
> + vmp_prmtr_set(instance,
> +   dev->capture.camera_port,
> +   MMAL_PARAMETER_CAPTURE,
> +   >capture.frame_count,
> +   sizeof(dev->capture.frame_count));
>   }
>   if (vchiq_mmal_submit_buffer(instance, port, buf))
>   v4l2_dbg(1, bcm2835_v4l2_debug, >v4l2_dev,
> @@ -392,12 +391,11 @@ static void buffer_cb(struct vchiq_mmal_instance 
> *instance,
>   is_capturing(dev)) {
>   v4l2_dbg(1, bcm2835_v4l2_debug, >v4l2_dev,
>"Grab another frame as buffer has EOS");
> - vchiq_mmal_port_parameter_set(
> - instance,
> - dev->capture.camera_port,
> - MMAL_PARAMETER_CAPTURE,
> - >capture.frame_count,
> - sizeof(dev->capture.frame_count));
> + vmp_prmtr_set(instance,
> +   dev->capture.camera_port,
> +   MMAL_PARAMETER_CAPTURE,
> +   >capture.frame_count,
> +   sizeof(dev->capture.frame_count));
>   }
>  }
>
> @@ -406,20 +404,18 @@ static int enable_camera(struct bm2835_mmal_dev *dev)
>   int ret;
>
>   if (!dev->camera_use_count) {
> - ret = vchiq_mmal_port_parameter_set(
> - dev->instance,
> - >component[COMP_CAMERA]->control,
> - MMAL_PARAMETER_CAMERA_NUM, >camera_num,
> - sizeof(dev->camera_num));
> + ret = vmp_prmtr_set(dev->instance,
> + >component[COMP_CAMERA]->control,
> + MMAL_PARAMETER_CAMERA_NUM, >camera_num,
> + sizeof(dev->camera_num));
>   if (ret < 0) {
>   v4l2_err(>v4l2_dev,
>"Failed setting camera num, ret %d\n", ret);
>   return -EINVAL;
>   }
>
> - ret = vchiq_mmal_component_enable(
> - dev->instance,
> - dev->component[COMP_CAMERA]);
> + ret = vm_cmpnt_enable(dev->instance,
> +   dev->component[COMP_CAMERA]);
>   if (ret < 0) {
>   v4l2_err(>v4l2_dev,
>"Failed enabling camera, ret %d\n", ret);
> @@ -449,19 +445,17 @@ static int disable_camera(struct bm2835_mmal_dev *dev)
>   v4l2_dbg(1, bcm2835_v4l2_debug, >v4l2_dev,
>"Disabling camera\n");
>   ret =
> - vchiq_mmal_component_disable(
> - dev->instance,
> - dev->component[COMP_CAMERA]);
> + vm_cmpnt_disable(dev->instance,
> +  dev->component[COMP_CAMERA]);
>   if (ret < 0)