[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c464dfb3-8d30-41e4-88ea-c7c21ee9cf92@linaro.org>
Date: Mon, 25 Nov 2024 12:10:57 +0000
From: Bryan O'Donoghue <bryan.odonoghue@...aro.org>
To: Vikram Sharma <quic_vikramsa@...cinc.com>, rfoss@...nel.org,
todor.too@...il.com
Cc: linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel@...cinc.com
Subject: Re: [PATCH v3 1/2] media: qcom: camss: reducing the repitious error
message string
On 25/11/2024 10:34, Vikram Sharma wrote:
> Introducing a new function camss_link_err to avoid repition of
> same error message, improving code maintainability.
>
> Signed-off-by: Vikram Sharma <quic_vikramsa@...cinc.com>
> ---
> drivers/media/platform/qcom/camss/camss.c | 60 ++++++++++++++---------
> 1 file changed, 37 insertions(+), 23 deletions(-)
>
> diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c
> index 9fb31f4c18ad..520c5bc7a265 100644
> --- a/drivers/media/platform/qcom/camss/camss.c
> +++ b/drivers/media/platform/qcom/camss/camss.c
> @@ -1993,6 +1993,26 @@ static int camss_init_subdevices(struct camss *camss)
> return 0;
> }
>
> +/*
> + * camss_link_entities - Register subdev nodes and create links
> + * camss_link_err - print error in case link creation fails
> + * @src_name: name for source of the link
> + * @sink_name: name for sink of the link
> + */
> +inline void camss_link_err(struct camss *camss,
> + const char *src_name,
> + const char *sink_name,
> + int ret)
> +{
> + if (!camss || !src_name || !sink_name)
> + return;
You don't need this defensive coding error check, please drop.
Once done you can add
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@...aro.org>
Powered by blists - more mailing lists