[PATCH] staging: vc04_services: Fix function call formatting
Dave Stevenson
dave.stevenson at raspberrypi.com
Fri Feb 21 11:40:31 PST 2025
Hi Ravi
On Fri, 21 Feb 2025 at 16:30, Ravi Kumar kairi <kumarkairiravi at gmail.com> wrote:
>
> From: Ravi Kumar Kairi <kumarkairiravi at gmail.com>
>
> 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 at gmail.com>
> ---
> .../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 at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rpi-kernel
More information about the linux-rpi-kernel
mailing list