linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Mukesh Ojha <quic_mojha@quicinc.com>,
	andersson@kernel.org, konrad.dybcio@linaro.org
Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] soc: qcom: llcc: Add llcc device availability check
Date: Tue, 12 Mar 2024 17:47:19 +0100	[thread overview]
Message-ID: <5abe8292-f9a1-4e47-84a2-3f2ca58ac9e4@kernel.org> (raw)
In-Reply-To: <ffa32cab-fa74-0c37-b3c9-c3c41cff9f9c@quicinc.com>

On 12/03/2024 17:25, Mukesh Ojha wrote:
>>>   static struct llcc_drv_data *drv_data = (void *) -EPROBE_DEFER;
>>> +static DEFINE_MUTEX(dev_avail);
>>> +
>>> +static bool is_llcc_device_available(void)
>>> +{
>>> +	static struct llcc_drv_data *ptr;
>>> +
>>> +	mutex_lock(&dev_avail);
>>> +	if (!ptr) {
>>> +		struct device_node *node;
>>> +
>>> +		node = of_find_node_by_name(NULL, "system-cache-controller");
>>
>> Why do you look names by name? This create undocumented ABI. >
>> NAK (also for any future uses of such of_find_node_by_name()).
> 
> I agree, what if we add a common compatible string like qcom,llcc to all 
> llcc supported SoCs.

I did not dig into the your problem (also commit msg does not really
help me in that), but usually relationship between device nodes is
expressed with phandles.

This also has benefits of easier (future) integration with device links
and probe ordering.

Best regards,
Krzysztof


      reply	other threads:[~2024-03-12 16:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-20 12:28 [PATCH] soc: qcom: llcc: Add llcc device availability check Mukesh Ojha
2024-02-22 18:07 ` Sahil Chandna
2024-02-26 10:32   ` Mukesh Ojha
2024-02-26 10:49     ` Sahil Chandna
2024-02-26 11:00       ` Mukesh Ojha
2024-03-07 10:21 ` Krzysztof Kozlowski
2024-03-12 16:25   ` Mukesh Ojha
2024-03-12 16:47     ` Krzysztof Kozlowski [this message]

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=5abe8292-f9a1-4e47-84a2-3f2ca58ac9e4@kernel.org \
    --to=krzk@kernel.org \
    --cc=andersson@kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=quic_mojha@quicinc.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;
as well as URLs for NNTP newsgroup(s).