[PATCH 0/5] pwrseq: replace magic numbers with defines for match() return values

Ulf Hansson ulf.hansson at linaro.org
Wed Jun 25 03:03:54 PDT 2025


On Tue, 24 Jun 2025 at 16:32, Bartosz Golaszewski <brgl at bgdev.pl> wrote:
>
> We currently use 0 or 1 as magic numbers returned from the match()
> callback. It's more readable to replace them with proper defines whose
> names indicate the meaning. While at it: fix a build issue with the
> thead-gpu driver I noticed and extend build coverage for the drivers.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski at linaro.org>
> ---
> Bartosz Golaszewski (5):
>       pwrseq: thead-gpu: add missing header
>       pwrseq: extend build coverage for pwrseq drivers with COMPILE_TEST=y
>       pwrseq: add defines for return values of the match() callback
>       pwrseq: qcom-wcn: use new defines for match() return values
>       pwrseq: thead-gpu: use new defines for match() return values
>
>  drivers/power/sequencing/Kconfig            |  4 ++--
>  drivers/power/sequencing/core.c             |  6 +++---
>  drivers/power/sequencing/pwrseq-qcom-wcn.c  |  8 ++++----
>  drivers/power/sequencing/pwrseq-thead-gpu.c | 12 +++++++-----
>  include/linux/pwrseq/provider.h             |  3 +++
>  5 files changed, 19 insertions(+), 14 deletions(-)
> ---
> base-commit: d4c2d9b5b7ceed14a3a835fd969bb0699b9608d3
> change-id: 20250624-pwrseq-match-defines-aec46817e69e
>
> Best regards,
> --
> Bartosz Golaszewski <bartosz.golaszewski at linaro.org>
>

For the series, feel free to add:

Reviewed-by: Ulf Hansson <ulf.hansson at linaro.org>

Kind regards
Uffe



More information about the linux-riscv mailing list