Re: [PATCH 0/4] firmware: qcom: scm: simplify code by using classes

From: Bjorn Andersson

Date: Thu Jul 30 2026 - 17:10:52 EST


On Wed, Jul 01, 2026 at 03:38:54PM +0200, Bartosz Golaszewski wrote:
> There's a pattern of enabling the clocks and/or setting the bandwith
> limits before performing an SCM call and reverting the above after it's
> node. In all places it's done unconditionally and can be simplified by
> providing appropriate classes. There are also a few places where we can
> use __free() for tzmem pointers.
>

This ended up conflicting with the PAS changes, can you please rebase?

Regards,
Bjorn

> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxxxxxxxx>
> ---
> Bartosz Golaszewski (4):
> firmware: qcom: tzmem: guard against IS_ERR() in the cleanup handler
> firmware: qcom: scm: use __free(qcom_tzmem) to simplify cleanup
> firmware: qcom: scm: introduce qcom_scm_clk class for clock management
> firmware: qcom: scm: introduce qcom_scm_bw class for bandwidth management
>
> drivers/firmware/qcom/qcom_scm.c | 184 ++++++++++++-------------------
> include/linux/firmware/qcom/qcom_tzmem.h | 2 +-
> 2 files changed, 73 insertions(+), 113 deletions(-)
> ---
> base-commit: be5c93fa674f0fc3c8f359c2143abce6bbb422e6
> change-id: 20260701-qcom-scm-code-shrink-c9aff845537d
>
> Best regards,
> --
> Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxxxxxxxx>
>