The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH v2 0/4] firmware: qcom: scm: simplify code by using classes
@ 2026-07-31  8:00 Bartosz Golaszewski
  2026-07-31  8:00 ` [PATCH v2 1/4] firmware: qcom: tzmem: guard against IS_ERR() in the cleanup handler Bartosz Golaszewski
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Bartosz Golaszewski @ 2026-07-31  8:00 UTC (permalink / raw)
  To: Bartosz Golaszewski, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, linux-kernel, Bartosz Golaszewski, Konrad Dybcio,
	Mukesh Ojha

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.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
---
Changes in v2:
- Rabase on top of recent SCM driver changes which introduced conflicts
- Collect tags
- Link to v1: https://patch.msgid.link/20260701-qcom-scm-code-shrink-v1-0-02f5ce02c95a@oss.qualcomm.com

---
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         | 185 ++++++++++++-------------------
 include/linux/firmware/qcom/qcom_tzmem.h |   2 +-
 2 files changed, 73 insertions(+), 114 deletions(-)
---
base-commit: 95d6a9ccef99117115e41e9adb271243bd5e985b
change-id: 20260701-qcom-scm-code-shrink-c9aff845537d

Best regards,
-- 
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-08-04 22:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-31  8:00 [PATCH v2 0/4] firmware: qcom: scm: simplify code by using classes Bartosz Golaszewski
2026-07-31  8:00 ` [PATCH v2 1/4] firmware: qcom: tzmem: guard against IS_ERR() in the cleanup handler Bartosz Golaszewski
2026-07-31  8:00 ` [PATCH v2 2/4] firmware: qcom: scm: use __free(qcom_tzmem) to simplify cleanup Bartosz Golaszewski
2026-08-04 22:30   ` Bjorn Andersson
2026-07-31  8:00 ` [PATCH v2 3/4] firmware: qcom: scm: introduce qcom_scm_clk class for clock management Bartosz Golaszewski
2026-08-04 15:35   ` Bjorn Andersson
2026-07-31  8:00 ` [PATCH v2 4/4] firmware: qcom: scm: introduce qcom_scm_bw class for bandwidth management Bartosz Golaszewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox