From: Greg Kroah-Hartman Date: Mon, 26 Aug 2024 13:05:37 +0000 (+0200) Subject: drop some thermal patches from 6.1 and 6.6 X-Git-Tag: v6.1.107~36 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dd388cfb19ee465099e8a5ac96e524cf8dab7a70;p=thirdparty%2Fkernel%2Fstable-queue.git drop some thermal patches from 6.1 and 6.6 --- diff --git a/queue-6.1/series b/queue-6.1/series index 91cdaa67715..6c858a3dbd6 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -274,8 +274,6 @@ cxgb4-add-forgotten-u64-ivlan-cast-before-shift.patch kvm-arm64-make-icc_-sgi-_el1-undef-in-the-absence-of-a-vgicv3.patch mmc-dw_mmc-allow-biu-and-ciu-clocks-to-defer.patch pmdomain-imx-wait-ssar-when-i.mx93-power-domain-on.patch -thermal-of-fix-of-node-leak-in-thermal_of_trips_init-error-path.patch -thermal-of-fix-of-node-leak-in-of_thermal_zone_find-error-paths.patch mptcp-pm-re-using-id-of-unused-removed-add_addr.patch mptcp-pm-re-using-id-of-unused-removed-subflows.patch mptcp-pm-re-using-id-of-unused-flushed-subflows.patch diff --git a/queue-6.1/thermal-of-fix-of-node-leak-in-of_thermal_zone_find-error-paths.patch b/queue-6.1/thermal-of-fix-of-node-leak-in-of_thermal_zone_find-error-paths.patch deleted file mode 100644 index 6cccda5ec38..00000000000 --- a/queue-6.1/thermal-of-fix-of-node-leak-in-of_thermal_zone_find-error-paths.patch +++ /dev/null @@ -1,68 +0,0 @@ -From c0a1ef9c5be72ff28a5413deb1b3e1a066593c13 Mon Sep 17 00:00:00 2001 -From: Krzysztof Kozlowski -Date: Wed, 14 Aug 2024 21:58:23 +0200 -Subject: thermal: of: Fix OF node leak in of_thermal_zone_find() error paths - -From: Krzysztof Kozlowski - -commit c0a1ef9c5be72ff28a5413deb1b3e1a066593c13 upstream. - -Terminating for_each_available_child_of_node() loop requires dropping OF -node reference, so bailing out on errors misses this. Solve the OF node -reference leak with scoped for_each_available_child_of_node_scoped(). - -Fixes: 3fd6d6e2b4e8 ("thermal/of: Rework the thermal device tree initialization") -Cc: -Signed-off-by: Krzysztof Kozlowski -Reviewed-by: Chen-Yu Tsai -Reviewed-by: Daniel Lezcano -Link: https://patch.msgid.link/20240814195823.437597-3-krzysztof.kozlowski@linaro.org -Signed-off-by: Rafael J. Wysocki -Signed-off-by: Greg Kroah-Hartman ---- - drivers/thermal/thermal_of.c | 13 +++++++------ - 1 file changed, 7 insertions(+), 6 deletions(-) - ---- a/drivers/thermal/thermal_of.c -+++ b/drivers/thermal/thermal_of.c -@@ -294,14 +294,14 @@ static struct device_node *of_thermal_zo - * Search for each thermal zone, a defined sensor - * corresponding to the one passed as parameter - */ -- for_each_available_child_of_node(np, tz) { -+ for_each_available_child_of_node_scoped(np, child) { - - int count, i; - -- count = of_count_phandle_with_args(tz, "thermal-sensors", -+ count = of_count_phandle_with_args(child, "thermal-sensors", - "#thermal-sensor-cells"); - if (count <= 0) { -- pr_err("%pOFn: missing thermal sensor\n", tz); -+ pr_err("%pOFn: missing thermal sensor\n", child); - tz = ERR_PTR(-EINVAL); - goto out; - } -@@ -310,18 +310,19 @@ static struct device_node *of_thermal_zo - - int ret; - -- ret = of_parse_phandle_with_args(tz, "thermal-sensors", -+ ret = of_parse_phandle_with_args(child, "thermal-sensors", - "#thermal-sensor-cells", - i, &sensor_specs); - if (ret < 0) { -- pr_err("%pOFn: Failed to read thermal-sensors cells: %d\n", tz, ret); -+ pr_err("%pOFn: Failed to read thermal-sensors cells: %d\n", child, ret); - tz = ERR_PTR(ret); - goto out; - } - - if ((sensor == sensor_specs.np) && id == (sensor_specs.args_count ? - sensor_specs.args[0] : 0)) { -- pr_debug("sensor %pOFn id=%d belongs to %pOFn\n", sensor, id, tz); -+ pr_debug("sensor %pOFn id=%d belongs to %pOFn\n", sensor, id, child); -+ tz = no_free_ptr(child); - goto out; - } - } diff --git a/queue-6.1/thermal-of-fix-of-node-leak-in-thermal_of_trips_init-error-path.patch b/queue-6.1/thermal-of-fix-of-node-leak-in-thermal_of_trips_init-error-path.patch deleted file mode 100644 index 91e149a2d86..00000000000 --- a/queue-6.1/thermal-of-fix-of-node-leak-in-thermal_of_trips_init-error-path.patch +++ /dev/null @@ -1,46 +0,0 @@ -From afc954fd223ded70b1fa000767e2531db55cce58 Mon Sep 17 00:00:00 2001 -From: Krzysztof Kozlowski -Date: Wed, 14 Aug 2024 21:58:21 +0200 -Subject: thermal: of: Fix OF node leak in thermal_of_trips_init() error path - -From: Krzysztof Kozlowski - -commit afc954fd223ded70b1fa000767e2531db55cce58 upstream. - -Terminating for_each_child_of_node() loop requires dropping OF node -reference, so bailing out after thermal_of_populate_trip() error misses -this. Solve the OF node reference leak with scoped -for_each_child_of_node_scoped(). - -Fixes: d0c75fa2c17f ("thermal/of: Initialize trip points separately") -Cc: All applicable -Signed-off-by: Krzysztof Kozlowski -Reviewed-by: Chen-Yu Tsai -Reviewed-by: Daniel Lezcano -Link: https://patch.msgid.link/20240814195823.437597-1-krzysztof.kozlowski@linaro.org -Signed-off-by: Rafael J. Wysocki -Signed-off-by: Greg Kroah-Hartman ---- - drivers/thermal/thermal_of.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/drivers/thermal/thermal_of.c -+++ b/drivers/thermal/thermal_of.c -@@ -235,7 +235,7 @@ static int thermal_of_populate_trip(stru - static struct thermal_trip *thermal_of_trips_init(struct device_node *np, int *ntrips) - { - struct thermal_trip *tt; -- struct device_node *trips, *trip; -+ struct device_node *trips; - int ret, count; - - trips = of_get_child_by_name(np, "trips"); -@@ -260,7 +260,7 @@ static struct thermal_trip *thermal_of_t - *ntrips = count; - - count = 0; -- for_each_child_of_node(trips, trip) { -+ for_each_child_of_node_scoped(trips, trip) { - ret = thermal_of_populate_trip(trip, &tt[count++]); - if (ret) - goto out_kfree; diff --git a/queue-6.6/series b/queue-6.6/series index a86484b21a1..d95165f72bf 100644 --- a/queue-6.6/series +++ b/queue-6.6/series @@ -307,8 +307,6 @@ mmc-dw_mmc-allow-biu-and-ciu-clocks-to-defer.patch pmdomain-imx-scu-pd-remove-duplicated-clocks.patch pmdomain-imx-wait-ssar-when-i.mx93-power-domain-on.patch nouveau-firmware-use-dma-non-coherent-allocator.patch -thermal-of-fix-of-node-leak-in-thermal_of_trips_init-error-path.patch -thermal-of-fix-of-node-leak-in-of_thermal_zone_find-error-paths.patch mptcp-pm-re-using-id-of-unused-removed-add_addr.patch mptcp-pm-re-using-id-of-unused-removed-subflows.patch mptcp-pm-re-using-id-of-unused-flushed-subflows.patch diff --git a/queue-6.6/thermal-of-fix-of-node-leak-in-of_thermal_zone_find-error-paths.patch b/queue-6.6/thermal-of-fix-of-node-leak-in-of_thermal_zone_find-error-paths.patch deleted file mode 100644 index b939d6d540b..00000000000 --- a/queue-6.6/thermal-of-fix-of-node-leak-in-of_thermal_zone_find-error-paths.patch +++ /dev/null @@ -1,68 +0,0 @@ -From c0a1ef9c5be72ff28a5413deb1b3e1a066593c13 Mon Sep 17 00:00:00 2001 -From: Krzysztof Kozlowski -Date: Wed, 14 Aug 2024 21:58:23 +0200 -Subject: thermal: of: Fix OF node leak in of_thermal_zone_find() error paths - -From: Krzysztof Kozlowski - -commit c0a1ef9c5be72ff28a5413deb1b3e1a066593c13 upstream. - -Terminating for_each_available_child_of_node() loop requires dropping OF -node reference, so bailing out on errors misses this. Solve the OF node -reference leak with scoped for_each_available_child_of_node_scoped(). - -Fixes: 3fd6d6e2b4e8 ("thermal/of: Rework the thermal device tree initialization") -Cc: -Signed-off-by: Krzysztof Kozlowski -Reviewed-by: Chen-Yu Tsai -Reviewed-by: Daniel Lezcano -Link: https://patch.msgid.link/20240814195823.437597-3-krzysztof.kozlowski@linaro.org -Signed-off-by: Rafael J. Wysocki -Signed-off-by: Greg Kroah-Hartman ---- - drivers/thermal/thermal_of.c | 13 +++++++------ - 1 file changed, 7 insertions(+), 6 deletions(-) - ---- a/drivers/thermal/thermal_of.c -+++ b/drivers/thermal/thermal_of.c -@@ -182,14 +182,14 @@ static struct device_node *of_thermal_zo - * Search for each thermal zone, a defined sensor - * corresponding to the one passed as parameter - */ -- for_each_available_child_of_node(np, tz) { -+ for_each_available_child_of_node_scoped(np, child) { - - int count, i; - -- count = of_count_phandle_with_args(tz, "thermal-sensors", -+ count = of_count_phandle_with_args(child, "thermal-sensors", - "#thermal-sensor-cells"); - if (count <= 0) { -- pr_err("%pOFn: missing thermal sensor\n", tz); -+ pr_err("%pOFn: missing thermal sensor\n", child); - tz = ERR_PTR(-EINVAL); - goto out; - } -@@ -198,18 +198,19 @@ static struct device_node *of_thermal_zo - - int ret; - -- ret = of_parse_phandle_with_args(tz, "thermal-sensors", -+ ret = of_parse_phandle_with_args(child, "thermal-sensors", - "#thermal-sensor-cells", - i, &sensor_specs); - if (ret < 0) { -- pr_err("%pOFn: Failed to read thermal-sensors cells: %d\n", tz, ret); -+ pr_err("%pOFn: Failed to read thermal-sensors cells: %d\n", child, ret); - tz = ERR_PTR(ret); - goto out; - } - - if ((sensor == sensor_specs.np) && id == (sensor_specs.args_count ? - sensor_specs.args[0] : 0)) { -- pr_debug("sensor %pOFn id=%d belongs to %pOFn\n", sensor, id, tz); -+ pr_debug("sensor %pOFn id=%d belongs to %pOFn\n", sensor, id, child); -+ tz = no_free_ptr(child); - goto out; - } - } diff --git a/queue-6.6/thermal-of-fix-of-node-leak-in-thermal_of_trips_init-error-path.patch b/queue-6.6/thermal-of-fix-of-node-leak-in-thermal_of_trips_init-error-path.patch deleted file mode 100644 index 3e162b4708b..00000000000 --- a/queue-6.6/thermal-of-fix-of-node-leak-in-thermal_of_trips_init-error-path.patch +++ /dev/null @@ -1,46 +0,0 @@ -From afc954fd223ded70b1fa000767e2531db55cce58 Mon Sep 17 00:00:00 2001 -From: Krzysztof Kozlowski -Date: Wed, 14 Aug 2024 21:58:21 +0200 -Subject: thermal: of: Fix OF node leak in thermal_of_trips_init() error path - -From: Krzysztof Kozlowski - -commit afc954fd223ded70b1fa000767e2531db55cce58 upstream. - -Terminating for_each_child_of_node() loop requires dropping OF node -reference, so bailing out after thermal_of_populate_trip() error misses -this. Solve the OF node reference leak with scoped -for_each_child_of_node_scoped(). - -Fixes: d0c75fa2c17f ("thermal/of: Initialize trip points separately") -Cc: All applicable -Signed-off-by: Krzysztof Kozlowski -Reviewed-by: Chen-Yu Tsai -Reviewed-by: Daniel Lezcano -Link: https://patch.msgid.link/20240814195823.437597-1-krzysztof.kozlowski@linaro.org -Signed-off-by: Rafael J. Wysocki -Signed-off-by: Greg Kroah-Hartman ---- - drivers/thermal/thermal_of.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/drivers/thermal/thermal_of.c -+++ b/drivers/thermal/thermal_of.c -@@ -123,7 +123,7 @@ static int thermal_of_populate_trip(stru - static struct thermal_trip *thermal_of_trips_init(struct device_node *np, int *ntrips) - { - struct thermal_trip *tt; -- struct device_node *trips, *trip; -+ struct device_node *trips; - int ret, count; - - trips = of_get_child_by_name(np, "trips"); -@@ -148,7 +148,7 @@ static struct thermal_trip *thermal_of_t - *ntrips = count; - - count = 0; -- for_each_child_of_node(trips, trip) { -+ for_each_child_of_node_scoped(trips, trip) { - ret = thermal_of_populate_trip(trip, &tt[count++]); - if (ret) - goto out_kfree;