All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bryan O'Donoghue <bod@kernel.org>
To: Albert Esteve <aesteve@redhat.com>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Russell King <linux@armlinux.org.uk>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Daniel Lezcano <daniel.lezcano@kernel.org>,
	Christian Loehle <christian.loehle@arm.com>,
	Maximilian Luz <luzmaximilian@gmail.com>,
	Bartosz Golaszewski <brgl@kernel.org>,
	Rob Clark <robin.clark@oss.qualcomm.com>,
	Sean Paul <sean@poorly.run>,
	Akhil P Oommen <akhilpo@oss.qualcomm.com>,
	Dmitry Baryshkov <lumag@kernel.org>,
	Abhinav Kumar <abhinav.kumar@linux.dev>,
	Jessica Zhang <jesszhan0024@gmail.com>,
	Marijn Suijten <marijn.suijten@somainline.org>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Will Deacon <will@kernel.org>,
	Robin Murphy <robin.murphy@arm.com>,
	"Joerg Roedel (AMD)" <joro@8bytes.org>,
	Thomas Gleixner <tglx@kernel.org>, Radu Rendec <radu@rendec.net>,
	Vikash Garodia <vikash.garodia@oss.qualcomm.com>,
	Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Srinivas Kandagatla <srini@kernel.org>,
	Ekansh Gupta <ekansh.gupta@oss.qualcomm.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jeff Johnson <jjohnson@kernel.org>,
	Linus Walleij <linusw@kernel.org>,
	Mathieu Poirier <mathieu.poirier@linaro.org>,
	Amirreza Zarrabi <amirreza.zarrabi@oss.qualcomm.com>,
	Jens Wiklander <jenswi@kernel.org>,
	Sumit Garg <sumit.garg@kernel.org>,
	Amit Kucheria <amitk@kernel.org>,
	Thara Gopinath <thara.gopinath@gmail.com>,
	Zhang Rui <rui.zhang@intel.com>,
	Lukasz Luba <lukasz.luba@arm.com>,
	Brian Norris <briannorris@chromium.org>,
	Govind Singh <govinds@codeaurora.org>,
	Niklas Cassel <niklas.cassel@linaro.org>,
	Kalle Valo <kvalo@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org,
	dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org,
	iommu@lists.linux.dev, linux-media@vger.kernel.org,
	linux-wireless@vger.kernel.org, ath10k@lists.infradead.org,
	linux-gpio@vger.kernel.org, linux-remoteproc@vger.kernel.org,
	op-tee@lists.trustedfirmware.org,
	Maxime Ripard <mripard@kernel.org>
Subject: Re: [PATCH 2/3] firmware: qcom: scm: pass qcom_scm through the exported API
Date: Wed, 23 Sep 2026 22:08:19 +0100	[thread overview]
Message-ID: <49153dff-b4e0-43ac-aa82-15175fea6445@kernel.org> (raw)
In-Reply-To: <20260914-scm-device-api-v1-2-3573e2596c51@redhat.com>

On 14/09/2026 13:41, Albert Esteve wrote:
>   static int spm_cpuidle_drv_probe(struct platform_device *pdev)
>   {
> +	struct qcom_scm *scm = qcom_scm_get();
>   	int cpu, ret;
> 
> -	if (!qcom_scm_is_available())
> +	if (!scm)
>   		return -EPROBE_DEFER;

Is this equivalent code ?

Its also a bit confusing to me that the next patch adds a .available 
field to the qcom_scm struct.

I see where you do get drvdata but I haven't managed to find in the 
series where the data gets set - haven't asked an LLM either - I think 
the logic to associate the scm pointer and get it should live together 
in one patch so that the logic is easier to find and reason about.

---
bod

WARNING: multiple messages have this Message-ID (diff)
From: Bryan O'Donoghue via OP-TEE <op-tee@lists.trustedfirmware.org>
To: Albert Esteve <aesteve@redhat.com>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Russell King <linux@armlinux.org.uk>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Daniel Lezcano <daniel.lezcano@kernel.org>,
	Christian Loehle <christian.loehle@arm.com>,
	Maximilian Luz <luzmaximilian@gmail.com>,
	Bartosz Golaszewski <brgl@kernel.org>,
	Rob Clark <robin.clark@oss.qualcomm.com>,
	Sean Paul <sean@poorly.run>,
	Akhil P Oommen <akhilpo@oss.qualcomm.com>,
	Dmitry Baryshkov <lumag@kernel.org>,
	Abhinav Kumar <abhinav.kumar@linux.dev>,
	Jessica Zhang <jesszhan0024@gmail.com>,
	Marijn Suijten <marijn.suijten@somainline.org>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Will Deacon <will@kernel.org>,
	Robin Murphy <robin.murphy@arm.com>,
	"Joerg Roedel (AMD)" <joro@8bytes.org>,
	Thomas Gleixner <tglx@kernel.org>, Radu Rendec <radu@rendec.net>,
	Vikash Garodia <vikash.garodia@oss.qualcomm.com>,
	Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Srinivas Kandagatla <srini@kernel.org>,
	Ekansh Gupta <ekansh.gupta@oss.qualcomm.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jeff Johnson <jjohnson@kernel.org>,
	Linus Walleij <linusw@kernel.org>,
	Mathieu Poirier <mathieu.poirier@linaro.org>,
	Amirreza Zarrabi <amirreza.zarrabi@oss.qualcomm.com>,
	Jens Wiklander <jenswi@kernel.org>,
	Sumit Garg <sumit.garg@kernel.org>,
	Amit Kucheria <amitk@kernel.org>,
	Thara Gopinath <thara.gopinath@gmail.com>,
	Zhang Rui <rui.zhang@intel.com>,
	Lukasz Luba <lukasz.luba@arm.com>,
	Brian Norris <briannorris@chromium.org>,
	Govind Singh <govinds@codeaurora.org>,
	Niklas Cassel <niklas.cassel@linaro.org>,
	Kalle Valo <kvalo@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org,
	dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org,
	iommu@lists.linux.dev, linux-media@vger.kernel.org,
	linux-wireless@vger.kernel.org, ath10k@lists.infradead.org,
	linux-gpio@vger.kernel.org, linux-remoteproc@vger.kernel.org,
	op-tee@lists.trustedfirmware.org,
	Maxime Ripard <mripard@kernel.org>
Subject: Re: [PATCH 2/3] firmware: qcom: scm: pass qcom_scm through the exported API
Date: Wed, 23 Sep 2026 22:08:19 +0100	[thread overview]
Message-ID: <49153dff-b4e0-43ac-aa82-15175fea6445@kernel.org> (raw)
In-Reply-To: <20260914-scm-device-api-v1-2-3573e2596c51@redhat.com>

On 14/09/2026 13:41, Albert Esteve wrote:
>   static int spm_cpuidle_drv_probe(struct platform_device *pdev)
>   {
> +	struct qcom_scm *scm = qcom_scm_get();
>   	int cpu, ret;
> 
> -	if (!qcom_scm_is_available())
> +	if (!scm)
>   		return -EPROBE_DEFER;

Is this equivalent code ?

Its also a bit confusing to me that the next patch adds a .available 
field to the qcom_scm struct.

I see where you do get drvdata but I haven't managed to find in the 
series where the data gets set - haven't asked an LLM either - I think 
the logic to associate the scm pointer and get it should live together 
in one patch so that the logic is easier to find and reason about.

---
bod

  parent reply	other threads:[~2026-09-23 21:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-14 12:41 [PATCH 0/3] firmware: qcom: scm: pass struct qcom_scm through the API Albert Esteve
2026-09-14 12:41 ` Albert Esteve via OP-TEE
2026-09-14 12:41 ` [PATCH 1/3] firmware: qcom: scm: pass qcom_scm to internal helpers Albert Esteve
2026-09-14 12:41   ` Albert Esteve via OP-TEE
2026-09-23 21:00   ` Bryan O'Donoghue
2026-09-23 21:00     ` Bryan O'Donoghue via OP-TEE
2026-09-24 15:00     ` Albert Esteve
2026-09-14 12:41 ` [PATCH 2/3] firmware: qcom: scm: pass qcom_scm through the exported API Albert Esteve
2026-09-14 12:41   ` Albert Esteve via OP-TEE
2026-09-14 13:05   ` sashiko-bot
2026-09-23 21:08   ` Bryan O'Donoghue [this message]
2026-09-23 21:08     ` Bryan O'Donoghue via OP-TEE
2026-09-24 15:42     ` Albert Esteve
2026-09-14 12:41 ` [PATCH 3/3] firmware: qcom: scm: drop the __scm global Albert Esteve
2026-09-14 12:41   ` Albert Esteve via OP-TEE
2026-09-14 13:18   ` sashiko-bot

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=49153dff-b4e0-43ac-aa82-15175fea6445@kernel.org \
    --to=bod@kernel.org \
    --cc=abhinav.kumar@linux.dev \
    --cc=aesteve@redhat.com \
    --cc=airlied@gmail.com \
    --cc=akhilpo@oss.qualcomm.com \
    --cc=amirreza.zarrabi@oss.qualcomm.com \
    --cc=amitk@kernel.org \
    --cc=andersson@kernel.org \
    --cc=arnd@arndb.de \
    --cc=ath10k@lists.infradead.org \
    --cc=brgl@kernel.org \
    --cc=briannorris@chromium.org \
    --cc=christian.loehle@arm.com \
    --cc=daniel.lezcano@kernel.org \
    --cc=dikshita.agarwal@oss.qualcomm.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ekansh.gupta@oss.qualcomm.com \
    --cc=freedreno@lists.freedesktop.org \
    --cc=govinds@codeaurora.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=iommu@lists.linux.dev \
    --cc=jenswi@kernel.org \
    --cc=jesszhan0024@gmail.com \
    --cc=jjohnson@kernel.org \
    --cc=joro@8bytes.org \
    --cc=konradybcio@kernel.org \
    --cc=kvalo@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=lukasz.luba@arm.com \
    --cc=lumag@kernel.org \
    --cc=luzmaximilian@gmail.com \
    --cc=marijn.suijten@somainline.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=mchehab@kernel.org \
    --cc=mripard@kernel.org \
    --cc=niklas.cassel@linaro.org \
    --cc=op-tee@lists.trustedfirmware.org \
    --cc=p.zabel@pengutronix.de \
    --cc=radu@rendec.net \
    --cc=rafael@kernel.org \
    --cc=robin.clark@oss.qualcomm.com \
    --cc=robin.murphy@arm.com \
    --cc=rui.zhang@intel.com \
    --cc=sean@poorly.run \
    --cc=simona@ffwll.ch \
    --cc=srini@kernel.org \
    --cc=sumit.garg@kernel.org \
    --cc=tglx@kernel.org \
    --cc=thara.gopinath@gmail.com \
    --cc=vikash.garodia@oss.qualcomm.com \
    --cc=will@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.