mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Kumari Pallavi <kumari.pallavi@oss.qualcomm.com>,
	kpallavi@qti.qualcomm.com, srini@kernel.org,
	amahesh@qti.qualcomm.com, arnd@arndb.de,
	gregkh@linuxfoundation.org
Cc: quic_bkumar@quicinc.com, ekansh.gupta@oss.qualcomm.com,
	linux-kernel@vger.kernel.org, quic_chennak@quicinc.com,
	dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org,
	jingyi.wang@oss.qualcomm.com, aiqun.yu@oss.qualcomm.com,
	ktadakam@qti.qualcomm.com
Subject: Re: [PATCH v2 2/3] misc: fastrpc: Add support for new DSP IOVA formatting
Date: Sat, 18 Oct 2025 19:24:25 +0200	[thread overview]
Message-ID: <14213195-29fa-48d9-8fc4-ccdc9b6f7ecc@kernel.org> (raw)
In-Reply-To: <20251015045702.3022060-3-kumari.pallavi@oss.qualcomm.com>

On 15/10/2025 06:57, Kumari Pallavi wrote:
>  static int fastrpc_rpmsg_probe(struct rpmsg_device *rpdev)
>  {
>  	struct device *rdev = &rpdev->dev;
> @@ -2291,6 +2319,22 @@ static int fastrpc_rpmsg_probe(struct rpmsg_device *rpdev)
>  	const char *domain;
>  	bool secure_dsp;
>  	unsigned int vmids[FASTRPC_MAX_VMIDS];
> +	struct device_node *root;
> +	const struct of_device_id *match;
> +	const struct fastrpc_soc_data *soc_data = NULL;
> +
> +	root = of_find_node_by_path("/");
> +	if (!root)
> +		return -ENODEV;
> +
> +	match = of_match_node(qcom_soc_match_table, root);

This is really odd way of doing things. You want to check machine, not
some node. Use proper API for that.

OTOH, I don't understand why you are checking machine in the first
place. If your device is different, then please follow writing bindings
- it explains exactly this case here.

> +	of_node_put(root);
> +	if (!match || !match->data) {
> +		 soc_data = &default_soc_data;
> +		 dev_dbg(rdev, "no compatible SoC found at root node\n");
> +	} else {
> +		 soc_data = match->data;
> +	}
>  


Best regards,
Krzysztof

  parent reply	other threads:[~2025-10-18 17:24 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-15  4:56 [PATCH v2 0/3] Add ADSP and CDSP support on Kaanapali SoC Kumari Pallavi
2025-10-15  4:57 ` [PATCH v2 1/3] misc: fastrpc: Rename phys to dma_addr for clarity Kumari Pallavi
2025-10-15  7:20   ` Arnd Bergmann
2025-10-15 10:49     ` Kumari Pallavi
2025-10-15 10:07   ` Dmitry Baryshkov
2025-10-23  7:20     ` Kumari Pallavi
2025-10-15  4:57 ` [PATCH v2 2/3] misc: fastrpc: Add support for new DSP IOVA formatting Kumari Pallavi
2025-10-15  7:09   ` Arnd Bergmann
2025-10-15  8:52   ` Srinivas Kandagatla
2025-10-15 10:47     ` Kumari Pallavi
2025-10-18 17:25       ` Krzysztof Kozlowski
2025-10-18 17:24   ` Krzysztof Kozlowski [this message]
2025-10-23  8:35     ` Kumari Pallavi
2025-10-23  8:41       ` Krzysztof Kozlowski
2025-10-15  4:57 ` [PATCH v2 3/3] misc: fastrpc: Update dma_mask for CDSP support on Kaanapali SoC Kumari Pallavi
2025-10-15  7:06   ` Arnd Bergmann
2025-10-15  9:25   ` Srinivas Kandagatla
2025-10-15 10:47     ` Kumari Pallavi

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=14213195-29fa-48d9-8fc4-ccdc9b6f7ecc@kernel.org \
    --to=krzk@kernel.org \
    --cc=aiqun.yu@oss.qualcomm.com \
    --cc=amahesh@qti.qualcomm.com \
    --cc=arnd@arndb.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ekansh.gupta@oss.qualcomm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jingyi.wang@oss.qualcomm.com \
    --cc=kpallavi@qti.qualcomm.com \
    --cc=ktadakam@qti.qualcomm.com \
    --cc=kumari.pallavi@oss.qualcomm.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=quic_bkumar@quicinc.com \
    --cc=quic_chennak@quicinc.com \
    --cc=srini@kernel.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

all inboxes | Powered by JetHome®