From 1ed7d13226cccfc5f185c24700f9e9a832ba831e Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Sun, 2 Feb 2025 10:16:44 -0500 Subject: [PATCH] Drop two PWM backports from 5.15 Signed-off-by: Sasha Levin --- .../pwm-stm32-add-check-for-clk_enable.patch | 46 ------------------ ...wm-stm32-lp-add-check-for-clk_enable.patch | 48 ------------------- queue-5.15/series | 2 - 3 files changed, 96 deletions(-) delete mode 100644 queue-5.15/pwm-stm32-add-check-for-clk_enable.patch delete mode 100644 queue-5.15/pwm-stm32-lp-add-check-for-clk_enable.patch diff --git a/queue-5.15/pwm-stm32-add-check-for-clk_enable.patch b/queue-5.15/pwm-stm32-add-check-for-clk_enable.patch deleted file mode 100644 index 77b1100889..0000000000 --- a/queue-5.15/pwm-stm32-add-check-for-clk_enable.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 3a96e70b8e700e704043a1d35f2fd18ad82177d8 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Sun, 15 Dec 2024 17:47:52 -0500 -Subject: pwm: stm32: Add check for clk_enable() -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: Mingwei Zheng - -[ Upstream commit e8c59791ebb60790c74b2c3ab520f04a8a57219a ] - -Add check for the return value of clk_enable() to catch the potential -error. - -Fixes: 19f1016ea960 ("pwm: stm32: Fix enable count for clk in .probe()") -Signed-off-by: Mingwei Zheng -Signed-off-by: Jiasheng Jiang -Link: https://lore.kernel.org/r/20241215224752.220318-1-zmw12306@gmail.com -Signed-off-by: Uwe Kleine-König -Signed-off-by: Sasha Levin ---- - drivers/pwm/pwm-stm32.c | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -diff --git a/drivers/pwm/pwm-stm32.c b/drivers/pwm/pwm-stm32.c -index 2070d107c6328..fda7d76f08b1b 100644 ---- a/drivers/pwm/pwm-stm32.c -+++ b/drivers/pwm/pwm-stm32.c -@@ -631,8 +631,11 @@ static int stm32_pwm_probe(struct platform_device *pdev) - priv->chip.npwm = stm32_pwm_detect_channels(priv, &num_enabled); - - /* Initialize clock refcount to number of enabled PWM channels. */ -- for (i = 0; i < num_enabled; i++) -- clk_enable(priv->clk); -+ for (i = 0; i < num_enabled; i++) { -+ ret = clk_enable(priv->clk); -+ if (ret) -+ return ret; -+ } - - ret = pwmchip_add(&priv->chip); - if (ret < 0) --- -2.39.5 - diff --git a/queue-5.15/pwm-stm32-lp-add-check-for-clk_enable.patch b/queue-5.15/pwm-stm32-lp-add-check-for-clk_enable.patch deleted file mode 100644 index 2ed0c5c18b..0000000000 --- a/queue-5.15/pwm-stm32-lp-add-check-for-clk_enable.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 8043273e4e4a30f3924ccbfcacbb1eeccb110d9b Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 6 Dec 2024 16:53:18 -0500 -Subject: pwm: stm32-lp: Add check for clk_enable() -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: Mingwei Zheng - -[ Upstream commit cce16e7f6216227964cda25f5f23634bce2c500f ] - -Add check for the return value of clk_enable() to catch the potential -error. -We used APP-Miner to find it. - -Fixes: e70a540b4e02 ("pwm: Add STM32 LPTimer PWM driver") -Signed-off-by: Mingwei Zheng -Signed-off-by: Jiasheng Jiang -Link: https://lore.kernel.org/r/20241206215318.3402860-1-zmw12306@gmail.com -Signed-off-by: Uwe Kleine-König -Signed-off-by: Sasha Levin ---- - drivers/pwm/pwm-stm32-lp.c | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/drivers/pwm/pwm-stm32-lp.c b/drivers/pwm/pwm-stm32-lp.c -index 61a1c87cd5016..c0350f5e02ac5 100644 ---- a/drivers/pwm/pwm-stm32-lp.c -+++ b/drivers/pwm/pwm-stm32-lp.c -@@ -169,8 +169,12 @@ static void stm32_pwm_lp_get_state(struct pwm_chip *chip, - regmap_read(priv->regmap, STM32_LPTIM_CR, &val); - state->enabled = !!FIELD_GET(STM32_LPTIM_ENABLE, val); - /* Keep PWM counter clock refcount in sync with PWM initial state */ -- if (state->enabled) -- clk_enable(priv->clk); -+ if (state->enabled) { -+ int ret = clk_enable(priv->clk); -+ -+ if (ret) -+ return ret; -+ } - - regmap_read(priv->regmap, STM32_LPTIM_CFGR, &val); - presc = FIELD_GET(STM32_LPTIM_PRESC, val); --- -2.39.5 - diff --git a/queue-5.15/series b/queue-5.15/series index 9f3cfa2b05..5fbff9b32b 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -55,7 +55,6 @@ acpi-fan-cleanup-resources-in-the-error-path-of-.pro.patch cpupower-fix-tsc-mhz-calculation.patch dt-bindings-mfd-bd71815-fix-rsense-and-typos.patch leds-netxbig-fix-an-of-node-reference-leak-in-netxbi.patch -pwm-stm32-lp-add-check-for-clk_enable.patch cpufreq-schedutil-fix-superfluous-updates-caused-by-.patch udp-deal-with-race-between-udp-socket-address-change.patch clk-imx8mp-fix-clkout1-2-support.patch @@ -73,7 +72,6 @@ selftests-harness-fix-printing-of-mismatch-values-in.patch wifi-cfg80211-handle-specific-bssid-in-6ghz-scanning.patch wifi-cfg80211-adjust-allocation-of-colocated-ap-data.patch clk-analogbits-fix-incorrect-calculation-of-vco-rate.patch -pwm-stm32-add-check-for-clk_enable.patch selftests-landlock-fix-error-message.patch net-let-net.core.dev_weight-always-be-non-zero.patch net-mlxfw-drop-hard-coded-max-fw-flash-image-size.patch -- 2.47.3