From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
To: Vikram Sharma <quic_vikramsa@quicinc.com>,
rfoss@kernel.org, todor.too@gmail.com
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel@quicinc.com
Subject: Re: [PATCH v3 1/2] media: qcom: camss: reducing the repitious error message string
Date: Mon, 25 Nov 2024 12:10:57 +0000 [thread overview]
Message-ID: <c464dfb3-8d30-41e4-88ea-c7c21ee9cf92@linaro.org> (raw)
In-Reply-To: <20241125103457.1970608-2-quic_vikramsa@quicinc.com>
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@quicinc.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@linaro.org>
next prev parent reply other threads:[~2024-11-25 12:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-25 10:34 [PATCH v3 0/2] media: qcom: camss: Re-structure camss_link_entities Vikram Sharma
2024-11-25 10:34 ` [PATCH v3 1/2] media: qcom: camss: reducing the repitious error message string Vikram Sharma
2024-11-25 12:10 ` Bryan O'Donoghue [this message]
2024-11-25 10:34 ` [PATCH v3 2/2] media: qcom: camss: Restructure camss_link_entities Vikram Sharma
2024-11-25 11:57 ` [PATCH v3 0/2] media: qcom: camss: Re-structure camss_link_entities Vladimir Zapolskiy
2024-11-25 12:14 ` Bryan O'Donoghue
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c464dfb3-8d30-41e4-88ea-c7c21ee9cf92@linaro.org \
--to=bryan.odonoghue@linaro.org \
--cc=kernel@quicinc.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=quic_vikramsa@quicinc.com \
--cc=rfoss@kernel.org \
--cc=todor.too@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®