]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Drop platform-x86-think-lmi-fix-sysfs-group-cleanup.patch
authorSasha Levin <sashal@kernel.org>
Tue, 15 Jul 2025 19:01:58 +0000 (15:01 -0400)
committerSasha Levin <sashal@kernel.org>
Tue, 15 Jul 2025 19:01:58 +0000 (15:01 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-5.15/platform-x86-think-lmi-fix-sysfs-group-cleanup.patch [deleted file]
queue-5.15/series
queue-6.1/platform-x86-think-lmi-fix-sysfs-group-cleanup.patch [deleted file]
queue-6.1/series

diff --git a/queue-5.15/platform-x86-think-lmi-fix-sysfs-group-cleanup.patch b/queue-5.15/platform-x86-think-lmi-fix-sysfs-group-cleanup.patch
deleted file mode 100644 (file)
index a490bcb..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-From 357c8f1ceab8d83276cdda4f32b6380846fb4f9a Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Sat, 12 Jul 2025 04:49:29 -0400
-Subject: platform/x86: think-lmi: Fix sysfs group cleanup
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-From: Kurt Borja <kuurtb@gmail.com>
-
-[ Upstream commit 4f30f946f27b7f044cf8f3f1f353dee1dcd3517a ]
-
-Many error paths in tlmi_sysfs_init() lead to sysfs groups being removed
-when they were not even created.
-
-Fix this by letting the kobject core manage these groups through their
-kobj_type's defult_groups.
-
-Fixes: a40cd7ef22fb ("platform/x86: think-lmi: Add WMI interface support on Lenovo platforms")
-Cc: stable@vger.kernel.org
-Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>
-Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
-Signed-off-by: Kurt Borja <kuurtb@gmail.com>
-Link: https://lore.kernel.org/r/20250630-lmi-fix-v3-3-ce4f81c9c481@gmail.com
-Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/platform/x86/think-lmi.c | 35 +++++++++-----------------------
- 1 file changed, 10 insertions(+), 25 deletions(-)
-
-diff --git a/drivers/platform/x86/think-lmi.c b/drivers/platform/x86/think-lmi.c
-index 36ff64a7b6847..cc46aa5f1da2c 100644
---- a/drivers/platform/x86/think-lmi.c
-+++ b/drivers/platform/x86/think-lmi.c
-@@ -491,6 +491,7 @@ static struct attribute *auth_attrs[] = {
- static const struct attribute_group auth_attr_group = {
-       .attrs = auth_attrs,
- };
-+__ATTRIBUTE_GROUPS(auth_attr);
- /* ---- Attributes sysfs --------------------------------------------------------- */
- static ssize_t display_name_show(struct kobject *kobj, struct kobj_attribute *attr,
-@@ -643,6 +644,7 @@ static const struct attribute_group tlmi_attr_group = {
-       .is_visible = attr_is_visible,
-       .attrs = tlmi_attrs,
- };
-+__ATTRIBUTE_GROUPS(tlmi_attr);
- static ssize_t tlmi_attr_show(struct kobject *kobj, struct attribute *attr,
-                                   char *buf)
-@@ -688,12 +690,14 @@ static void tlmi_pwd_setting_release(struct kobject *kobj)
- static struct kobj_type tlmi_attr_setting_ktype = {
-       .release        = &tlmi_attr_setting_release,
--      .sysfs_ops      = &tlmi_kobj_sysfs_ops,
-+      .sysfs_ops      = &kobj_sysfs_ops,
-+      .default_groups = tlmi_attr_groups,
- };
- static struct kobj_type tlmi_pwd_setting_ktype = {
-       .release        = &tlmi_pwd_setting_release,
--      .sysfs_ops      = &tlmi_kobj_sysfs_ops,
-+      .sysfs_ops      = &kobj_sysfs_ops,
-+      .default_groups = auth_attr_groups,
- };
- static ssize_t pending_reboot_show(struct kobject *kobj, struct kobj_attribute *attr,
-@@ -765,25 +769,18 @@ static struct kobj_attribute debug_cmd = __ATTR_WO(debug_cmd);
- /* ---- Initialisation --------------------------------------------------------- */
- static void tlmi_release_attr(void)
- {
--      int i;
-+      struct kobject *pos, *n;
-       /* Attribute structures */
--      for (i = 0; i < TLMI_SETTINGS_COUNT; i++) {
--              if (tlmi_priv.setting[i]) {
--                      sysfs_remove_group(&tlmi_priv.setting[i]->kobj, &tlmi_attr_group);
--                      kobject_put(&tlmi_priv.setting[i]->kobj);
--              }
--      }
-       sysfs_remove_file(&tlmi_priv.attribute_kset->kobj, &pending_reboot.attr);
-       if (tlmi_priv.can_debug_cmd && debug_support)
-               sysfs_remove_file(&tlmi_priv.attribute_kset->kobj, &debug_cmd.attr);
-       kset_unregister(tlmi_priv.attribute_kset);
-       /* Authentication structures */
--      sysfs_remove_group(&tlmi_priv.pwd_admin->kobj, &auth_attr_group);
--      kobject_put(&tlmi_priv.pwd_admin->kobj);
--      sysfs_remove_group(&tlmi_priv.pwd_power->kobj, &auth_attr_group);
--      kobject_put(&tlmi_priv.pwd_power->kobj);
-+      list_for_each_entry_safe(pos, n, &tlmi_priv.authentication_kset->list, entry)
-+              kobject_put(pos);
-+
-       kset_unregister(tlmi_priv.authentication_kset);
- }
-@@ -855,10 +852,6 @@ static int tlmi_sysfs_init(void)
-                                 "%s", tlmi_priv.setting[i]->display_name);
-               if (ret)
-                       goto fail_create_attr;
--
--              ret = sysfs_create_group(&tlmi_priv.setting[i]->kobj, &tlmi_attr_group);
--              if (ret)
--                      goto fail_create_attr;
-       }
-       ret = sysfs_create_file(&tlmi_priv.attribute_kset->kobj, &pending_reboot.attr);
-@@ -876,19 +869,11 @@ static int tlmi_sysfs_init(void)
-       if (ret)
-               goto fail_create_attr;
--      ret = sysfs_create_group(&tlmi_priv.pwd_admin->kobj, &auth_attr_group);
--      if (ret)
--              goto fail_create_attr;
--
-       tlmi_priv.pwd_power->kobj.kset = tlmi_priv.authentication_kset;
-       ret = kobject_add(&tlmi_priv.pwd_power->kobj, NULL, "%s", "System");
-       if (ret)
-               goto fail_create_attr;
--      ret = sysfs_create_group(&tlmi_priv.pwd_power->kobj, &auth_attr_group);
--      if (ret)
--              goto fail_create_attr;
--
-       return ret;
- fail_create_attr:
--- 
-2.39.5
-
index b57c48a75cb32f4beacdcc3bea261d4afc4c0186..ec4a233f71eeb9d1b512a6009b1fe6b387e71ccb 100644 (file)
@@ -50,7 +50,6 @@ usb-dwc3-abort-suspend-on-soft-disconnect-failure.patch
 dma-buf-add-dma_resv_for_each_fence_unlocked-v8.patch
 dma-buf-use-new-iterator-in-dma_resv_wait_timeout.patch
 dma-buf-fix-timeout-handling-in-dma_resv_wait_timeou.patch
-platform-x86-think-lmi-fix-sysfs-group-cleanup.patch
 wifi-zd1211rw-fix-potential-null-pointer-dereference.patch
 md-raid1-fix-stack-memory-use-after-return-in-raid1_.patch
 raid10-cleanup-memleak-at-raid10_make_request.patch
diff --git a/queue-6.1/platform-x86-think-lmi-fix-sysfs-group-cleanup.patch b/queue-6.1/platform-x86-think-lmi-fix-sysfs-group-cleanup.patch
deleted file mode 100644 (file)
index a788686..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-From b0e2afd8b3bee745e8e375df02f976f9f8ffd690 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Sat, 12 Jul 2025 03:36:43 -0400
-Subject: platform/x86: think-lmi: Fix sysfs group cleanup
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-From: Zhang Rui <rui.zhang@intel.com>
-
-[ Upstream commit 4f30f946f27b7f044cf8f3f1f353dee1dcd3517a ]
-
-Many error paths in tlmi_sysfs_init() lead to sysfs groups being removed
-when they were not even created.
-
-Fix this by letting the kobject core manage these groups through their
-kobj_type's defult_groups.
-
-Fixes: a40cd7ef22fb ("platform/x86: think-lmi: Add WMI interface support on Lenovo platforms")
-Cc: stable@vger.kernel.org
-Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>
-Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
-Signed-off-by: Kurt Borja <kuurtb@gmail.com>
-Link: https://lore.kernel.org/r/20250630-lmi-fix-v3-3-ce4f81c9c481@gmail.com
-Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/powercap/intel_rapl_common.c | 22 ++++++++++++++++++++--
- 1 file changed, 20 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/powercap/intel_rapl_common.c b/drivers/powercap/intel_rapl_common.c
-index 26d00b1853b42..02787682b395e 100644
---- a/drivers/powercap/intel_rapl_common.c
-+++ b/drivers/powercap/intel_rapl_common.c
-@@ -21,6 +21,7 @@
- #include <linux/intel_rapl.h>
- #include <linux/processor.h>
- #include <linux/platform_device.h>
-+#include <linux/string_helpers.h>
- #include <asm/iosf_mbi.h>
- #include <asm/cpu_device_id.h>
-@@ -227,17 +228,34 @@ static int find_nr_power_limit(struct rapl_domain *rd)
- static int set_domain_enable(struct powercap_zone *power_zone, bool mode)
- {
-       struct rapl_domain *rd = power_zone_to_rapl_domain(power_zone);
-+      u64 val;
-+      int ret;
-       if (rd->state & DOMAIN_STATE_BIOS_LOCKED)
-               return -EACCES;
-       cpus_read_lock();
--      rapl_write_data_raw(rd, PL1_ENABLE, mode);
-+      ret = rapl_write_data_raw(rd, PL1_ENABLE, mode);
-+      if (ret)
-+              goto end;
-+
-+      ret = rapl_read_data_raw(rd, PL1_ENABLE, true, &val);
-+      if (ret)
-+              goto end;
-+
-+      if (mode != val) {
-+              pr_debug("%s cannot be %s\n", power_zone->name,
-+                       str_enabled_disabled(mode));
-+              goto end;
-+      }
-+
-       if (rapl_defaults->set_floor_freq)
-               rapl_defaults->set_floor_freq(rd, mode);
-+
-+end:
-       cpus_read_unlock();
--      return 0;
-+      return ret;
- }
- static int get_domain_enable(struct powercap_zone *power_zone, bool *mode)
--- 
-2.39.5
-
index edcb84401f4ce6f028f87a87e7d3ae5be91d81e2..9117ddd785e9f57d4cda2e5a2e2a481eac9be113 100644 (file)
@@ -50,7 +50,6 @@ usb-cdnsp-remove-trb_flush_endpoint-command.patch
 usb-cdnsp-replace-snprintf-with-the-safer-scnprintf-.patch
 usb-cdnsp-fix-issue-with-cv-bad-descriptor-test.patch
 usb-dwc3-abort-suspend-on-soft-disconnect-failure.patch
-platform-x86-think-lmi-fix-sysfs-group-cleanup.patch
 wifi-zd1211rw-fix-potential-null-pointer-dereference.patch
 drm-tegra-nvdec-fix-dma_alloc_coherent-error-check.patch
 md-raid1-fix-stack-memory-use-after-return-in-raid1_.patch