LKML Archive mirror
 help / color / mirror / Atom feed
From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
To: "Gjorgji Rosikopulos (Consultant)" <quic_grosikop@quicinc.com>,
	Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>,
	rfoss@kernel.org, todor.too@gmail.com, andersson@kernel.org,
	konrad.dybcio@linaro.org, mchehab@kernel.org
Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org, laurent.pinchart@ideasonboard.com,
	hverkuil-cisco@xs4all.nl, quic_hariramp@quicinc.com
Subject: Re: [PATCH v3 8/8] media: qcom: camss: Decouple VFE from CSID
Date: Mon, 13 May 2024 18:48:31 +0100	[thread overview]
Message-ID: <5bcfbb01-9650-4420-8982-af6537d7e7b5@linaro.org> (raw)
In-Reply-To: <b4bf05b5-4e03-40d9-8149-956b55d91a41@quicinc.com>

On 13/05/2024 17:26, Gjorgji Rosikopulos (Consultant) wrote:
>>> +static void __iomem
>>> +*vfe_parent_dev_ops_get_base_address(struct camss *camss, int id)
>>> +{
>>> +    if (id < camss->res->vfe_num) {
>>> +        struct vfe_device *vfe = &camss->vfe[id];
>>> +
>>> +        return vfe->base;
>>> +    }
>>> +
>>> +    return NULL;
>> I can find code snippets above like
>>
>>      if (IS_ERR(csid->base))
>>          ...
>>
>> So, is it really a good idea to return NULL on error? Probably it might
>> be better
>> to return a reasonable error to the caller.
> As general rule i agree. But here either we have address or not,
> i dont see the reason to return an error code. Also i dont see what
> caller will do if he gets error code instead of NULL.
> I am refering in particular this case. If we have different error paths
> of failiure maybe it will more sense.

I don't see a compelling reason to change the submitted code. I'd leave 
well-enough alone for v4.

Please keep changes for V4 restricted to formatting/line indentation/SPDX.

I don't want to have to reverify all of this code unless a bug is found.

---
bod

  reply	other threads:[~2024-05-13 17:48 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-11 12:45 [PATCH v3 0/8] Move camss version related defs in to resources Gjorgji Rosikopulos
2024-04-11 12:45 ` [PATCH v3 1/8] media: qcom: camss: Add per sub-device type resources Gjorgji Rosikopulos
2024-05-10 18:26   ` Bryan O'Donoghue
2024-05-10 22:18   ` Bryan O'Donoghue
2024-05-13  9:55     ` Gjorgji Rosikopulos (Consultant)
2024-05-10 23:09   ` [PATCH v3.1] " Bryan O'Donoghue
2024-04-11 12:45 ` [PATCH v3 2/8] media: qcom: camss: Attach formats to VFE resources Gjorgji Rosikopulos
2024-05-10 18:27   ` Bryan O'Donoghue
2024-05-13 15:15   ` Vladimir Zapolskiy
2024-05-13 15:35     ` Gjorgji Rosikopulos (Consultant)
2024-05-13 17:36       ` Bryan O'Donoghue
2024-05-14  8:39         ` Gjorgji Rosikopulos (Consultant)
2024-04-11 12:45 ` [PATCH v3 3/8] media: qcom: camss: Attach formats to CSID resources Gjorgji Rosikopulos
2024-05-10 18:27   ` Bryan O'Donoghue
2024-04-11 12:45 ` [PATCH v3 4/8] media: qcom: camss: Attach formats to CSIPHY resources Gjorgji Rosikopulos
2024-05-10 18:28   ` Bryan O'Donoghue
2024-04-11 12:45 ` [PATCH v3 5/8] media: qcom: camss: Move format related functions Gjorgji Rosikopulos
2024-05-10 18:28   ` Bryan O'Donoghue
2024-05-13 15:39   ` Vladimir Zapolskiy
2024-05-13 16:52     ` Gjorgji Rosikopulos (Consultant)
2024-05-13 17:43       ` Bryan O'Donoghue
2024-04-11 12:45 ` [PATCH v3 6/8] media: qcom: camss: Split testgen, RDI and RX for CSID 170 Gjorgji Rosikopulos
2024-05-10 18:28   ` Bryan O'Donoghue
2024-04-11 12:45 ` [PATCH v3 7/8] media: qcom: camss: Decompose register and link operations Gjorgji Rosikopulos
2024-05-10 18:29   ` Bryan O'Donoghue
2024-04-11 12:45 ` [PATCH v3 8/8] media: qcom: camss: Decouple VFE from CSID Gjorgji Rosikopulos
2024-05-10 18:29   ` Bryan O'Donoghue
2024-05-13 15:58   ` Vladimir Zapolskiy
2024-05-13 16:26     ` Gjorgji Rosikopulos (Consultant)
2024-05-13 17:48       ` Bryan O'Donoghue [this message]
2024-05-10 18:33 ` [PATCH v3 0/8] Move camss version related defs in to resources 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=5bcfbb01-9650-4420-8982-af6537d7e7b5@linaro.org \
    --to=bryan.odonoghue@linaro.org \
    --cc=andersson@kernel.org \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=konrad.dybcio@linaro.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=quic_grosikop@quicinc.com \
    --cc=quic_hariramp@quicinc.com \
    --cc=rfoss@kernel.org \
    --cc=todor.too@gmail.com \
    --cc=vladimir.zapolskiy@linaro.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).