Re: [PATCH] staging: vc04_services: Fix function call formatting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ravi

On Fri, 21 Feb 2025 at 16:30, Ravi Kumar kairi <kumarkairiravi@xxxxxxxxx> wrote:
>
> From: Ravi Kumar Kairi <kumarkairiravi@xxxxxxxxx>
>
> Adjust function calls to avoid placing an opening parenthesis at
> the end of a line, improving readability and maintaining proper
> kernel coding style.
>
> Signed-off-by: Ravi Kumar Kairi <kumarkairiravi@xxxxxxxxx>
> ---
>  .../vc04_services/bcm2835-camera/controls.c        | 14 ++++++--------
>  1 file changed, 6 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/staging/vc04_services/bcm2835-camera/controls.c b/drivers/staging/vc04_services/bcm2835-camera/controls.c
> index 6bce45925b..d00d910989 100644
> --- a/drivers/staging/vc04_services/bcm2835-camera/controls.c
> +++ b/drivers/staging/vc04_services/bcm2835-camera/controls.c
> @@ -533,17 +533,15 @@ static int ctrl_set_image_effect(struct bcm2835_mmal_dev *dev,
>
>                 control = &dev->component[COMP_CAMERA]->control;
>
> -               ret = vchiq_mmal_port_parameter_set(
> -                               dev->instance, control,
> -                               MMAL_PARAMETER_IMAGE_EFFECT_PARAMETERS,
> -                               &imagefx, sizeof(imagefx));
> +               ret = vchiq_mmal_port_parameter_set(dev->instance,
> +                                                   control, MMAL_PARAMETER_IMAGE_EFFECT_PARAMETERS,
> +                                                   &imagefx, sizeof(imagefx));

Is there any reason that you haven't moved control up to the previous line?

Media drivers still have a strong preference for a max line length of
80 characters[1]
Your second line is exactly on 100 chars, but can drop down to 92 by
moving control.

[1] https://github.com/torvalds/linux/blob/master/Documentation/driver-api/media/maintainer-entry-profile.rst#coding-style-addendum

>                 if (ret)
>                         goto exit;
>
> -               ret = vchiq_mmal_port_parameter_set(
> -                               dev->instance, control,
> -                               MMAL_PARAMETER_COLOUR_EFFECT,
> -                               &dev->colourfx, sizeof(dev->colourfx));
> +               ret = vchiq_mmal_port_parameter_set(dev->instance,
> +                                                   control, MMAL_PARAMETER_COLOUR_EFFECT,
> +                                                   &dev->colourfx, sizeof(dev->colourfx));

Ditto.
Moving control brings the second line down to 81 chars.

  Dave

>         }
>
>  exit:
> --
> 2.48.1
>
>
> _______________________________________________
> linux-rpi-kernel mailing list
> linux-rpi-kernel@xxxxxxxxxxxxxxxxxxx
> http://lists.infradead.org/mailman/listinfo/linux-rpi-kernel




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux