* [PATCH RFC v3 03/11] leds: trigger: Add offloaded() callback and provide trigger_may_offload attribute
From: Rong Zhang @ 2026-07-18 17:05 UTC (permalink / raw)
To: Lee Jones, Pavel Machek, Jonathan Corbet, Shuah Khan,
Thomas Weißschuh, Benson Leung, Guenter Roeck,
Marek Behún, Mark Pearson, Derek J. Clark, Hans de Goede,
Ilpo Järvinen, Ike Panhc
Cc: Andrew Lunn, Jakub Kicinski, Vishnu Sankar, Vishnu Sankar,
linux-leds, netdev, linux-doc, linux-kernel, chrome-platform,
platform-driver-x86, Rong Zhang
In-Reply-To: <20260719-leds-trigger-hw-changed-v3-0-5fb55722e36e@rong.moe>
There are multiple triggers implementing hardware control. However, the
LED trigger core doesn't really know the hardware control (offloaded)
state since the coordination is done directly between the trigger and
the LED driver. It can only assume private triggers as offloaded and
generic ones as not offloaded.
Add an offloaded() callback so that triggers can report their offloaded
states to the LED trigger core. When unimplemented, it defaults to true
for private triggers and false for generic ones to keep the current
behavior unchanged.
With that, provide a new attribute "trigger_may_offload", so that
userspace can determine:
- if the LED device supports hardware control (supported => visible)
- which trigger is the hardware control trigger selected by the LED
device
- if the trigger is selected ("<foo_trigger>")
- if the trigger is offloaded ("[foo_trigger]")
Note: the documentation describes the attribute as "returning a list"
despite the LED core currently only supports one hardware control
trigger per LED device. This is intentional to make the attribute
extensible in the future without breaking userspace.
Signed-off-by: Rong Zhang <i@rong.moe>
---
Changes in v3:
- Rearrange the series so that the code using the offloaded() callback is
introduced before the driver implementation (thanks Thomas Weißschuh)
- Reword documentation (ditto)
- Adopt guard() and lockdep (ditto)
- Adopt __led_trigger_is_hw_controlled() from newly-integrated PATCH 1
---
Documentation/ABI/testing/sysfs-class-led | 22 ++++++++++++++++++++++
Documentation/leds/leds-class.rst | 20 ++++++++++++++++++++
drivers/leds/led-class.c | 22 ++++++++++++++++++++++
drivers/leds/led-triggers.c | 29 +++++++++++++++++++++++++++++
drivers/leds/leds.h | 2 ++
include/linux/leds.h | 1 +
6 files changed, 96 insertions(+)
diff --git a/Documentation/ABI/testing/sysfs-class-led b/Documentation/ABI/testing/sysfs-class-led
index d4c918cc11a1..b61fc2e71bd3 100644
--- a/Documentation/ABI/testing/sysfs-class-led
+++ b/Documentation/ABI/testing/sysfs-class-led
@@ -78,6 +78,28 @@ Description:
(which would often be configured in the device tree for the
hardware).
+What: /sys/class/leds/<led>/trigger_may_offload
+Date: July 2026
+KernelVersion: 7.3
+Contact: linux-leds@vger.kernel.org
+Description:
+ Names and states of triggers that may be offloaded to hardware.
+ Such triggers are also called "hardware control trigger" in some
+ context.
+
+ Only exists when the LED supports trigger offload.
+
+ Reading this file returns a list of triggers that are capable to
+ be offloaded. The optional brackets around the trigger name
+ indicate the state of the current trigger:
+
+ - `foo_trigger`: the trigger is not selected.
+ - `<foo_trigger>`: the trigger is selected, but falls back to
+ software blink for some reason (e.g., incompatible trigger
+ parameters)
+ - `[foo_trigger]`: the trigger is selected and offloaded to
+ hardware.
+
What: /sys/class/leds/<led>/inverted
Date: January 2011
KernelVersion: 2.6.38
diff --git a/Documentation/leds/leds-class.rst b/Documentation/leds/leds-class.rst
index 3913966cfdac..2d41a6db602c 100644
--- a/Documentation/leds/leds-class.rst
+++ b/Documentation/leds/leds-class.rst
@@ -242,6 +242,9 @@ ops and needs to declare specific support for the supported triggers.
With hw control we refer to the LED driven by hardware.
+A sysfs attribute `trigger_may_offload` is provided for userspace to
+query supported triggers and their states.
+
LED driver must define the following value to support hw control:
- hw_control_trigger:
@@ -298,6 +301,15 @@ LED driver must implement the following API to support hw control:
Returns a pointer to a struct device or NULL if nothing
is currently attached.
+LED trigger should implement the following API to indicate hw control:
+ - offloaded:
+ return a boolean indicating if the trigger is currently
+ offloaded to hardware.
+
+ If a trigger doesn't implement this callback, the default
+ value will be true for private triggers and false for generic
+ ones.
+
LED driver can activate additional modes by default to workaround the
impossibility of supporting each different mode on the supported trigger.
Examples are hardcoding the blink speed to a set interval, enable special
@@ -311,6 +323,14 @@ the end use hw_control_set to activate hw control.
A trigger can use hw_control_get to check if a LED is already in hw control
and init their flags.
+Alternatively, a private trigger can be implemented along with the LED driver if
+the LED's hardware control doesn't fit any generic trigger. To associate the
+private trigger with the LED classdev, their `trigger_type` must be the same. To
+declare that the private trigger provides hardware control for the associated
+LED classdev, set the `hw_control_trigger` string to the trigger's name. Since
+both the LED classdev and the private trigger are in the same LED driver, it's
+not necessary for them to coordinate via `hw_control_*` callbacks.
+
When the LED is in hw control, no software blink is possible and doing so
will effectively disable hw control.
diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c
index ab61e41a00a3..2460fcf0c469 100644
--- a/drivers/leds/led-class.c
+++ b/drivers/leds/led-class.c
@@ -96,8 +96,30 @@ static const struct bin_attribute *const led_trigger_bin_attrs[] = {
&bin_attr_trigger,
NULL,
};
+
+static DEVICE_ATTR_RO(trigger_may_offload);
+static struct attribute *led_trigger_attrs[] = {
+ &dev_attr_trigger_may_offload.attr,
+ NULL
+};
+
+static umode_t led_trigger_is_visible(struct kobject *kobj,
+ struct attribute *attr,
+ int idx)
+{
+ struct device *dev = kobj_to_dev(kobj);
+ struct led_classdev *led_cdev = dev_get_drvdata(dev);
+
+ if (attr == &dev_attr_trigger_may_offload.attr)
+ return led_cdev->hw_control_trigger ? attr->mode : 0;
+
+ return attr->mode;
+}
+
static const struct attribute_group led_trigger_group = {
.bin_attrs = led_trigger_bin_attrs,
+ .attrs = led_trigger_attrs,
+ .is_visible = led_trigger_is_visible,
};
#endif
diff --git a/drivers/leds/led-triggers.c b/drivers/leds/led-triggers.c
index 804a04b326c4..c3c41ef40f01 100644
--- a/drivers/leds/led-triggers.c
+++ b/drivers/leds/led-triggers.c
@@ -42,6 +42,9 @@ static bool __led_trigger_is_hw_controlled(struct led_classdev *led_cdev)
if (!led_cdev->trigger)
return false;
+ if (led_cdev->trigger->offloaded)
+ return led_cdev->trigger->offloaded(led_cdev);
+
return led_cdev->trigger->trigger_type;
}
@@ -341,6 +344,32 @@ void led_trigger_set_default(struct led_classdev *led_cdev)
}
EXPORT_SYMBOL_GPL(led_trigger_set_default);
+ssize_t trigger_may_offload_show(struct device *dev,
+ struct device_attribute *attr, char *buf)
+{
+ struct led_classdev *led_cdev = dev_get_drvdata(dev);
+ struct led_trigger *trig;
+ bool hit, offloaded;
+ int len;
+
+ guard(mutex)(&led_cdev->led_access);
+ guard(rwsem_read)(&led_cdev->trigger_lock);
+
+ trig = led_cdev->trigger;
+
+ offloaded = __led_trigger_is_hw_controlled(led_cdev);
+ hit = offloaded || (trig && !strcmp(led_cdev->hw_control_trigger, trig->name));
+
+ /* [offloaded] <active_but_not_offloaded> inactive */
+ len = sysfs_emit(buf, "%s%s%s\n",
+ offloaded ? "[" : (hit ? "<" : ""),
+ led_cdev->hw_control_trigger,
+ offloaded ? "]" : (hit ? ">" : ""));
+
+ return len;
+}
+EXPORT_SYMBOL_GPL(trigger_may_offload_show);
+
/* LED Trigger Interface */
int led_trigger_register(struct led_trigger *trig)
diff --git a/drivers/leds/leds.h b/drivers/leds/leds.h
index bee46651e068..b08a289397e4 100644
--- a/drivers/leds/leds.h
+++ b/drivers/leds/leds.h
@@ -27,6 +27,8 @@ ssize_t led_trigger_read(struct file *filp, struct kobject *kobj,
ssize_t led_trigger_write(struct file *filp, struct kobject *kobj,
const struct bin_attribute *bin_attr, char *buf,
loff_t pos, size_t count);
+ssize_t trigger_may_offload_show(struct device *dev,
+ struct device_attribute *attr, char *buf);
extern struct rw_semaphore leds_list_lock;
extern struct list_head leds_list;
diff --git a/include/linux/leds.h b/include/linux/leds.h
index d7d3dd905432..cc664da33e94 100644
--- a/include/linux/leds.h
+++ b/include/linux/leds.h
@@ -485,6 +485,7 @@ struct led_trigger {
const char *name;
int (*activate)(struct led_classdev *led_cdev);
void (*deactivate)(struct led_classdev *led_cdev);
+ bool (*offloaded)(struct led_classdev *led_cdev);
/* Brightness set by led_trigger_event */
enum led_brightness brightness;
--
2.53.0
^ permalink raw reply related
* [PATCH RFC v3 02/11] leds: class: Remove hardware control trigger when writing brightness
From: Rong Zhang @ 2026-07-18 17:05 UTC (permalink / raw)
To: Lee Jones, Pavel Machek, Jonathan Corbet, Shuah Khan,
Thomas Weißschuh, Benson Leung, Guenter Roeck,
Marek Behún, Mark Pearson, Derek J. Clark, Hans de Goede,
Ilpo Järvinen, Ike Panhc
Cc: Andrew Lunn, Jakub Kicinski, Vishnu Sankar, Vishnu Sankar,
linux-leds, netdev, linux-doc, linux-kernel, chrome-platform,
platform-driver-x86, Rong Zhang
In-Reply-To: <20260719-leds-trigger-hw-changed-v3-0-5fb55722e36e@rong.moe>
Since commit b819dc7d8fb2 ("leds: core: Report ENODATA for brightness of
hardware controlled LED"), the brightness attribute becomes write-only
when the LED is controlled fully by the hardware. A write-only attribute
is very confusing.
Moreover, most LED drivers set hardware brightness innocently with the
side effect of disabling hardware control, but the hardware control
trigger remains active, resulting in the software and hardware being out
of sync.
Fix it by removing the hardware control trigger when writing the
brightness attribute.
This should also match the semantics of hardware control:
When the LED is in hw control, no software blink is possible and
doing so will effectively disable hw control.
Fixes: b819dc7d8fb2 ("leds: core: Report ENODATA for brightness of hardware controlled LED")
Signed-off-by: Rong Zhang <i@rong.moe>
---
Changes in v3:
- New patch in the series, integrated from https://lore.kernel.org/all/20260712-leds-hw-control-brightness-set-v1-1-1de593b09d26@rong.moe/
- The following patches will improve __led_trigger_is_hw_controlled()
to include offloaded generic triggers and take the advantage of it
---
drivers/leds/led-class.c | 3 +++
drivers/leds/led-triggers.c | 9 +++++++++
include/linux/leds.h | 2 ++
3 files changed, 14 insertions(+)
diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c
index 1b8b688aaaaf..ab61e41a00a3 100644
--- a/drivers/leds/led-class.c
+++ b/drivers/leds/led-class.c
@@ -64,6 +64,9 @@ static ssize_t brightness_store(struct device *dev,
if (state == LED_OFF)
led_trigger_remove(led_cdev);
+ else
+ led_trigger_remove_hw_control(led_cdev);
+
led_set_brightness(led_cdev, state);
ret = size;
diff --git a/drivers/leds/led-triggers.c b/drivers/leds/led-triggers.c
index bf2543538ed0..804a04b326c4 100644
--- a/drivers/leds/led-triggers.c
+++ b/drivers/leds/led-triggers.c
@@ -287,6 +287,15 @@ void led_trigger_remove(struct led_classdev *led_cdev)
}
EXPORT_SYMBOL_GPL(led_trigger_remove);
+void led_trigger_remove_hw_control(struct led_classdev *led_cdev)
+{
+ guard(rwsem_write)(&led_cdev->trigger_lock);
+
+ if (__led_trigger_is_hw_controlled(led_cdev))
+ led_trigger_set(led_cdev, NULL);
+}
+EXPORT_SYMBOL_GPL(led_trigger_remove_hw_control);
+
static bool led_match_default_trigger(struct led_classdev *led_cdev,
struct led_trigger *trig)
{
diff --git a/include/linux/leds.h b/include/linux/leds.h
index a630f5a79f6b..d7d3dd905432 100644
--- a/include/linux/leds.h
+++ b/include/linux/leds.h
@@ -533,6 +533,7 @@ void led_trigger_blink_oneshot(struct led_trigger *trigger,
void led_trigger_set_default(struct led_classdev *led_cdev);
int led_trigger_set(struct led_classdev *led_cdev, struct led_trigger *trigger);
void led_trigger_remove(struct led_classdev *led_cdev);
+void led_trigger_remove_hw_control(struct led_classdev *led_cdev);
bool led_trigger_is_hw_controlled(struct led_classdev *led_cdev);
@@ -586,6 +587,7 @@ static inline int led_trigger_set(struct led_classdev *led_cdev,
}
static inline void led_trigger_remove(struct led_classdev *led_cdev) {}
+static inline void led_trigger_remove_hw_control(struct led_classdev *led_cdev) {}
static inline bool led_trigger_is_hw_controlled(struct led_classdev *led_cdev)
{
--
2.53.0
^ permalink raw reply related
* [PATCH RFC v3 01/11] leds: Move led_trigger_is_hw_controlled() to the right place
From: Rong Zhang @ 2026-07-18 17:05 UTC (permalink / raw)
To: Lee Jones, Pavel Machek, Jonathan Corbet, Shuah Khan,
Thomas Weißschuh, Benson Leung, Guenter Roeck,
Marek Behún, Mark Pearson, Derek J. Clark, Hans de Goede,
Ilpo Järvinen, Ike Panhc
Cc: Andrew Lunn, Jakub Kicinski, Vishnu Sankar, Vishnu Sankar,
linux-leds, netdev, linux-doc, linux-kernel, chrome-platform,
platform-driver-x86, Rong Zhang
In-Reply-To: <20260719-leds-trigger-hw-changed-v3-0-5fb55722e36e@rong.moe>
Currently led_trigger_is_hw_controlled() is placed at led-class.c, which
is not an right place as it falls into the triggers namespace and does
triggers stuff.
Move it into led-triggers.c, and split it into locked and unlocked
variant for convenience.
Fixes: b819dc7d8fb2 ("leds: core: Report ENODATA for brightness of hardware controlled LED")
Signed-off-by: Rong Zhang <i@rong.moe>
---
Changes in v3:
- New patch in the series, the dependency of the following patches
---
drivers/leds/led-class.c | 10 ----------
drivers/leds/led-triggers.c | 19 +++++++++++++++++++
include/linux/leds.h | 8 ++++++++
3 files changed, 27 insertions(+), 10 deletions(-)
diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c
index a51b0ed53886..1b8b688aaaaf 100644
--- a/drivers/leds/led-class.c
+++ b/drivers/leds/led-class.c
@@ -27,16 +27,6 @@ static LIST_HEAD(leds_lookup_list);
static struct workqueue_struct *leds_wq;
-static bool led_trigger_is_hw_controlled(struct led_classdev *led_cdev)
-{
-#ifdef CONFIG_LEDS_TRIGGERS
- guard(rwsem_read)(&led_cdev->trigger_lock);
- return led_cdev->trigger && led_cdev->trigger->trigger_type;
-#else
- return false;
-#endif
-}
-
static ssize_t brightness_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
diff --git a/drivers/leds/led-triggers.c b/drivers/leds/led-triggers.c
index b1223218bda1..bf2543538ed0 100644
--- a/drivers/leds/led-triggers.c
+++ b/drivers/leds/led-triggers.c
@@ -7,9 +7,11 @@
* Author: Richard Purdie <rpurdie@openedhand.com>
*/
+#include <linux/cleanup.h>
#include <linux/export.h>
#include <linux/kernel.h>
#include <linux/list.h>
+#include <linux/lockdep.h>
#include <linux/spinlock.h>
#include <linux/device.h>
#include <linux/timer.h>
@@ -33,6 +35,23 @@ trigger_relevant(struct led_classdev *led_cdev, struct led_trigger *trig)
return !trig->trigger_type || trig->trigger_type == led_cdev->trigger_type;
}
+static bool __led_trigger_is_hw_controlled(struct led_classdev *led_cdev)
+{
+ lockdep_assert_held(&led_cdev->trigger_lock);
+
+ if (!led_cdev->trigger)
+ return false;
+
+ return led_cdev->trigger->trigger_type;
+}
+
+bool led_trigger_is_hw_controlled(struct led_classdev *led_cdev)
+{
+ guard(rwsem_read)(&led_cdev->trigger_lock);
+ return __led_trigger_is_hw_controlled(led_cdev);
+}
+EXPORT_SYMBOL_GPL(led_trigger_is_hw_controlled);
+
ssize_t led_trigger_write(struct file *filp, struct kobject *kobj,
const struct bin_attribute *bin_attr, char *buf,
loff_t pos, size_t count)
diff --git a/include/linux/leds.h b/include/linux/leds.h
index b16b803cc1ac..a630f5a79f6b 100644
--- a/include/linux/leds.h
+++ b/include/linux/leds.h
@@ -534,6 +534,8 @@ void led_trigger_set_default(struct led_classdev *led_cdev);
int led_trigger_set(struct led_classdev *led_cdev, struct led_trigger *trigger);
void led_trigger_remove(struct led_classdev *led_cdev);
+bool led_trigger_is_hw_controlled(struct led_classdev *led_cdev);
+
static inline void led_set_trigger_data(struct led_classdev *led_cdev,
void *trigger_data)
{
@@ -584,6 +586,12 @@ static inline int led_trigger_set(struct led_classdev *led_cdev,
}
static inline void led_trigger_remove(struct led_classdev *led_cdev) {}
+
+static inline bool led_trigger_is_hw_controlled(struct led_classdev *led_cdev)
+{
+ return false;
+}
+
static inline void led_set_trigger_data(struct led_classdev *led_cdev) {}
static inline void *led_get_trigger_data(struct led_classdev *led_cdev)
{
--
2.53.0
^ permalink raw reply related
* [PATCH RFC v3 00/11] leds: Add support for hardware-initiated hardware control trigger transition
From: Rong Zhang @ 2026-07-18 17:05 UTC (permalink / raw)
To: Lee Jones, Pavel Machek, Jonathan Corbet, Shuah Khan,
Thomas Weißschuh, Benson Leung, Guenter Roeck,
Marek Behún, Mark Pearson, Derek J. Clark, Hans de Goede,
Ilpo Järvinen, Ike Panhc
Cc: Andrew Lunn, Jakub Kicinski, Vishnu Sankar, Vishnu Sankar,
linux-leds, netdev, linux-doc, linux-kernel, chrome-platform,
platform-driver-x86, Rong Zhang
Some laptops can tune their keyboard backlight according to ambient
light sensors (auto mode). This capability is essentially a hardware
control trigger. Meanwhile, such laptops also offer a shrotcut for
cycling through brightness levels and auto mode. For example, on
ThinkBook, pressing Fn+Space ("shortcut") cycles keyboard backlight
levels in the following sequence:
1 => 2 => 0 => auto => 1 ...
Recent ThinkPad models should have similar sequence too.
However, there are some issues preventing us from using a private
hardware control trigger:
1. We want a mechanism to tell userspace which trigger is the hardware
control one, so that userspace can determine if auto mode is on/off,
as well as turing it on/off programmatically without obtaining the
trigger's name via other channels
2. Writing brightness has the side effect of disabling hardware control,
but the hardware control trigger remains active, resulting in the
software and hardware being out of sync. Most LED drivers that
supports hardware control also suffer from the same issue
3. Turing on/off auto mode via the shortcut cannot activate/deactivate
the corresponding hardware control trigger, making the software state
out of sync
4. Even with #3 solved, deactivating the hardware control trigger has
the side effect of emitting LED_OFF, breaking the shortcut cycle,
especially "auto => 1"
This RFC series tries to demonstrate a path on solving these issues:
- Introduce an attribute "trigger_may_offload", so that userspace can
determine:
- if the LED device supports hardware control (supported => visible)
- which trigger is the hardware control trigger selected by the LED
device
- if the trigger is selected ("<foo_trigger>")
- if the trigger is offloaded ("[foo_trigger]")
- A callback offloaded() is added so that LED triggers can report
their hardware control state
- Remove hardware control trigger when writing brightness
- Add led_trigger_notify_hw_control_changed() interface, so that LED
drivers can notify the LED core about hardware-initiated hardware
control transitions. The LED core will then determine if the
transition is allowed and switching between "none" (i.e., no trigger)
and the device's private trigger accordingly
- This capability is restricted to the device's private trigger. If
the current trigger is neither the private trigger nor "none", no
transition will be made
- This interface is gated behind Kconfig LEDS_TRIGGERS_HW_CHANGED and
LED device flag LED_TRIG_HW_CHANGED
- Tune the logic of trigger deactivation so that it won't emit LED_OFF
when the deactivation is triggered by hardware
The last three patches are included in the RFC series to demonstrate how
to these interfaces are supposed to be utilized, so that ideapad-laptop
can expose the auto mode of ThinkBook's keyboard backlight. They can be
submitted separately once the dust settles, if preferred.
[ Summary of other approaches ]
< custom attribute >
Pros:
- simplicity, KISS
- no need to touch the LED core
- extensible as long as it has a sensor-neutral name
- a sensor-related name could potentially lead to a mess if a future
device implements auto mode based on multiple different sensors
Cons:
- must have zero influence on brightness_set[_blocking] callbacks
in order not to break triggers
- potential interference with triggers and the brightness attribute,
can't solve #2
- weird semantic (an attribute other than "brightness" and "trigger"
changes the brightness)
< private hardware control trigger (this series) >
Pros:
- mutually exclusive with other triggers and the brightness attribute
(hence less chaos)
- semantic correctness
- acts as an aggregate switch to turn on/off auto mode even a future
device implements auto mode based on multiple different sensors
- extensibility (through trigger attributes)
Cons:
- complexity
[ Previous discussion threads ]
https://lore.kernel.org/r/08580ec5-1d7b-4612-8a3f-75bc2f40aad2@app.fastmail.com
https://lore.kernel.org/r/1dbfcf656cdb4af0299f90d7426d2ec7e2b8ac9e.camel@rong.moe
Signed-off-by: Rong Zhang <i@rong.moe>
---
Changes in v3:
- Integrate https://lore.kernel.org/all/20260712-leds-hw-control-brightness-set-v1-1-1de593b09d26@rong.moe/
into the series
- Adopt __led_trigger_is_hw_controlled() in the rest of the series
- Rearrange the series so that the code using the offloaded() callback is
introduced before the driver implementation (thanks Thomas Weißschuh)
- Reword documentations and commit messages (ditto)
- Adopt guard() and lockdep (ditto)
- Address concerns from Sashiko
- Fix a race condition in ideapad_kbd_bl_led_cdev_brightness_set()
- Fix trigger re-registration of ideapad_kbd_bl_auto_trigger
- https://sashiko.dev/#/patchset/20260618-leds-trigger-hw-changed-v2-0-c28c44053cf3%40rong.moe
- Make registration failures of ideapad_kbd_bl_auto_trigger non-fatal
- Link to v2: https://patch.msgid.link/20260618-leds-trigger-hw-changed-v2-0-c28c44053cf3@rong.moe
Changes in v2:
- Restrict the led_trigger_notify_hw_control_changed() interface to
private triggers only
- Drop PATCH v1 1/9 ("leds: Load trigger modules on-demand if used as
hw control trigger"), not relavant any more
- Gate the led_trigger_notify_hw_control_changed() interface behind
Kconfig LEDS_TRIGGERS_HW_CHANGED and LED device flag
LED_TRIG_HW_CHANGED
- Fix lock ordering inversion
- ideapad-laptop:
- Only call led_trigger_notify_hw_control_changed() when needed
- Serialize keyboard backlight notifications
- Reword commit messages and documentations
- Link to v1: https://patch.msgid.link/20260227190617.271388-1-i@rong.moe
---
Rong Zhang (11):
leds: Move led_trigger_is_hw_controlled() to the right place
leds: class: Remove hardware control trigger when writing brightness
leds: trigger: Add offloaded() callback and provide trigger_may_offload attribute
leds: cros_ec: trigger: Implement offloaded() callback
leds: turris-omnia: trigger: Implement offloaded() and declare hw_control_trigger
leds: trigger: netdev: Implement offloaded() callback
leds: trigger: Enforce strict checks in led_trigger_is_hw_controlled()
leds: trigger: Add led_trigger_notify_hw_control_changed() interface
platform/x86: ideapad-laptop: Decouple hardware & classdev brightness for keyboard backlight
platform/x86: ideapad-laptop: Serialize keyboard backlight notifications
platform/x86: ideapad-laptop: Fully support auto keyboard backlight
Documentation/ABI/testing/sysfs-class-led | 25 ++
.../ABI/testing/sysfs-class-led-trigger-netdev | 3 +
Documentation/leds/leds-class.rst | 72 ++++++
drivers/leds/led-class.c | 35 ++-
drivers/leds/led-triggers.c | 146 +++++++++++-
drivers/leds/leds-cros_ec.c | 6 +
drivers/leds/leds-turris-omnia.c | 7 +
drivers/leds/leds.h | 2 +
drivers/leds/trigger/Kconfig | 9 +
drivers/leds/trigger/ledtrig-netdev.c | 8 +
drivers/platform/x86/lenovo/Kconfig | 1 +
drivers/platform/x86/lenovo/ideapad-laptop.c | 264 ++++++++++++++++-----
include/linux/leds.h | 19 ++
13 files changed, 532 insertions(+), 65 deletions(-)
---
base-commit: 1229e2e57a5c2980ccd457b9b53ea0eed5a22ab3
change-id: 20260506-leds-trigger-hw-changed-96a62188cbdf
Thanks,
Rong
^ permalink raw reply
* [PATCH v3] Documentation: add SPDX license identifiers to RST files
From: Yahya Toubali @ 2026-07-18 16:56 UTC (permalink / raw)
To: Tejun Heo, Johannes Weiner, Michal Koutný, Jonathan Corbet,
Shuah Khan, Jaroslav Kysela, Takashi Iwai,
open list:CONTROL GROUP (CGROUP), open list:DOCUMENTATION,
open list, open list:DOCUMENTATION PROCESS, open list:SOUND
Cc: Yahya Toubali
Add SPDX-License-Identifier: GPL-2.0 to RST documentation files
that were missing it. This aligns with kernel documentation
conventions.
Signed-off-by: Yahya Toubali <yahya@yahyatoubali.me>
---
Documentation/admin-guide/cgroup-v2.rst | 1 +
Documentation/core-api/housekeeping.rst | 2 ++
Documentation/core-api/memory-allocation.rst | 1 +
Documentation/doc-guide/sphinx.rst | 1 +
Documentation/process/5.Posting.rst | 1 +
Documentation/process/howto.rst | 1 +
Documentation/sound/designs/index.rst | 2 ++
7 files changed, 9 insertions(+)
diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst
index 481658cfef40..f15a613fed6a 100644
--- a/Documentation/admin-guide/cgroup-v2.rst
+++ b/Documentation/admin-guide/cgroup-v2.rst
@@ -1,4 +1,5 @@
.. _cgroup-v2:
+.. SPDX-License-Identifier: GPL-2.0
================
Control Group v2
diff --git a/Documentation/core-api/housekeeping.rst b/Documentation/core-api/housekeeping.rst
index 71ba5d86f249..f4dc5f9337b1 100644
--- a/Documentation/core-api/housekeeping.rst
+++ b/Documentation/core-api/housekeeping.rst
@@ -1,3 +1,5 @@
+.. SPDX-License-Identifier: GPL-2.0
+
======================================
Housekeeping
======================================
diff --git a/Documentation/core-api/memory-allocation.rst b/Documentation/core-api/memory-allocation.rst
index 0f19dd524323..370f5a0c4238 100644
--- a/Documentation/core-api/memory-allocation.rst
+++ b/Documentation/core-api/memory-allocation.rst
@@ -1,4 +1,5 @@
.. _memory_allocation:
+.. SPDX-License-Identifier: GPL-2.0
=======================
Memory Allocation Guide
diff --git a/Documentation/doc-guide/sphinx.rst b/Documentation/doc-guide/sphinx.rst
index 51c370260f3b..74a3425e81c9 100644
--- a/Documentation/doc-guide/sphinx.rst
+++ b/Documentation/doc-guide/sphinx.rst
@@ -1,4 +1,5 @@
.. _sphinxdoc:
+.. SPDX-License-Identifier: GPL-2.0
=====================================
Using Sphinx for kernel documentation
diff --git a/Documentation/process/5.Posting.rst b/Documentation/process/5.Posting.rst
index 07d7dbed13ec..510abeea8977 100644
--- a/Documentation/process/5.Posting.rst
+++ b/Documentation/process/5.Posting.rst
@@ -1,4 +1,5 @@
.. _development_posting:
+.. SPDX-License-Identifier: GPL-2.0
Posting patches
===============
diff --git a/Documentation/process/howto.rst b/Documentation/process/howto.rst
index 9438e03d6f50..9001024e44cf 100644
--- a/Documentation/process/howto.rst
+++ b/Documentation/process/howto.rst
@@ -1,4 +1,5 @@
.. _process_howto:
+.. SPDX-License-Identifier: GPL-2.0
HOWTO do Linux kernel development
=================================
diff --git a/Documentation/sound/designs/index.rst b/Documentation/sound/designs/index.rst
index 6b825c5617fc..4ba4038187b5 100644
--- a/Documentation/sound/designs/index.rst
+++ b/Documentation/sound/designs/index.rst
@@ -1,3 +1,5 @@
+.. SPDX-License-Identifier: GPL-2.0
+
Designs and Implementations
===========================
base-commit: 1229e2e57a5c2980ccd457b9b53ea0eed5a22ab3
prerequisite-patch-id: c8aee5eb39e3cd6f2b2f28c82163565665288d2a
prerequisite-patch-id: 60ad32e9f0e74902635d7886b97c4225ac8dc5ce
prerequisite-patch-id: 76849a9365b2ef77eae25f4ee42c11f124b1ea0d
prerequisite-patch-id: 7d40674803d67642dd3326a8f4061acbcfb72998
--
2.55.0
^ permalink raw reply related
* [PATCH v3] Documentation: admin-guide: fix trailing whitespace in cgroup-v2.rst
From: Yahya Toubali @ 2026-07-18 16:56 UTC (permalink / raw)
To: Tejun Heo, Johannes Weiner, Michal Koutný, Jonathan Corbet,
Shuah Khan, open list:CONTROL GROUP (CGROUP),
open list:DOCUMENTATION, open list
Cc: Weijie Yuan, Randy Dunlap, Yahya Toubali
In-Reply-To: <alumXzlDApA_iMbY@wyuan.org>
Remove trailing whitespace flagged by checkpatch.pl in the cgroup
memory and writeback sections.
Signed-off-by: Yahya Toubali <yahya@yahyatoubali.me>
---
Documentation/admin-guide/cgroup-v2.rst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst
index 14b8c571c0d1..481658cfef40 100644
--- a/Documentation/admin-guide/cgroup-v2.rst
+++ b/Documentation/admin-guide/cgroup-v2.rst
@@ -1332,7 +1332,7 @@ PAGE_SIZE multiple when read back.
cgroup is within its effective low boundary, the cgroup's
memory won't be reclaimed unless there is no reclaimable
memory available in unprotected cgroups.
- Above the effective low boundary (or
+ Above the effective low boundary (or
effective min boundary if it is higher), pages are reclaimed
proportionally to the overage, reducing reclaim pressure for
smaller overages.
@@ -2194,7 +2194,7 @@ of the two is enforced.
cgroup writeback requires explicit support from the underlying
filesystem. Currently, cgroup writeback is implemented on ext2, ext4,
-btrfs, f2fs, and xfs. On other filesystems, all writeback IOs are
+btrfs, f2fs, and xfs. On other filesystems, all writeback IOs are
attributed to the root cgroup.
There are inherent differences in memory and writeback management
base-commit: 1229e2e57a5c2980ccd457b9b53ea0eed5a22ab3
prerequisite-patch-id: c8aee5eb39e3cd6f2b2f28c82163565665288d2a
--
2.55.0
^ permalink raw reply related
* [PATCH v3] Documentation: fix spelling typos
From: Yahya Toubali @ 2026-07-18 16:56 UTC (permalink / raw)
To: Jonathan Corbet, Shuah Khan, Mark Pearson, Derek J. Clark,
Armin Wolf, open list:DOCUMENTATION, open list,
open list:LENOVO drivers
Cc: Weijie Yuan, Yahya Toubali
In-Reply-To: <alukuB0r73qfc1PG@wyuan.org>
Fix 'Minumum' -> 'Minimum' in lenovo-wmi-other.rst and
'maintainance' -> 'maintenance' in housekeeping.rst.
These were flagged by checkpatch.
Signed-off-by: Yahya Toubali <yahya@yahyatoubali.me>
---
Documentation/core-api/housekeeping.rst | 2 +-
Documentation/wmi/devices/lenovo-wmi-other.rst | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/core-api/housekeeping.rst b/Documentation/core-api/housekeeping.rst
index ccb0a88b9cb3..71ba5d86f249 100644
--- a/Documentation/core-api/housekeeping.rst
+++ b/Documentation/core-api/housekeeping.rst
@@ -9,7 +9,7 @@ extreme workloads can't stand, such as in some DPDK usecases.
The kernel work moved away by CPU isolation is commonly described as
"housekeeping" because it includes ground work that performs cleanups,
-statistics maintainance and actions relying on them, memory release,
+statistics maintenance and actions relying on them, memory release,
various deferrals etc...
Sometimes housekeeping is just some unbound work (unbound workqueues,
diff --git a/Documentation/wmi/devices/lenovo-wmi-other.rst b/Documentation/wmi/devices/lenovo-wmi-other.rst
index 011054d64eac..65cb78ef285a 100644
--- a/Documentation/wmi/devices/lenovo-wmi-other.rst
+++ b/Documentation/wmi/devices/lenovo-wmi-other.rst
@@ -163,5 +163,5 @@ data using the `bmfdec <https://github.com/pali/bmfdec>`_ utility:
[WmiDataId(1), read, Description("Mode.")] uint32 NumOfFans;
[WmiDataId(2), read, Description("Fan ID."), WmiSizeIs("NumOfFans")] uint32 FanId[];
[WmiDataId(3), read, Description("Maximum Fan Speed."), WmiSizeIs("NumOfFans")] uint32 FanMaxSpeed[];
- [WmiDataId(4), read, Description("Minumum Fan Speed."), WmiSizeIs("NumOfFans")] uint32 FanMinSpeed[];
+ [WmiDataId(4), read, Description("Minimum Fan Speed."), WmiSizeIs("NumOfFans")] uint32 FanMinSpeed[];
};
base-commit: 1229e2e57a5c2980ccd457b9b53ea0eed5a22ab3
prerequisite-patch-id: c8aee5eb39e3cd6f2b2f28c82163565665288d2a
prerequisite-patch-id: 60ad32e9f0e74902635d7886b97c4225ac8dc5ce
prerequisite-patch-id: 76849a9365b2ef77eae25f4ee42c11f124b1ea0d
--
2.55.0
^ permalink raw reply related
* [PATCH v3] Documentation: proc: fix repeated word 'page'
From: Yahya Toubali @ 2026-07-18 16:56 UTC (permalink / raw)
To: Jonathan Corbet, Shuah Khan, open list:PROC FILESYSTEM,
open list:PROC FILESYSTEM, open list:DOCUMENTATION
Cc: Yahya Toubali
Remove the duplicate 'page' in the sentence describing large page
allocation accounting. The extra word makes the description confusing.
Signed-off-by: Yahya Toubali <yahya@yahyatoubali.me>
---
Documentation/filesystems/proc.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/filesystems/proc.rst b/Documentation/filesystems/proc.rst
index 2ccd5b2dfdd3..d22ac0addd42 100644
--- a/Documentation/filesystems/proc.rst
+++ b/Documentation/filesystems/proc.rst
@@ -513,7 +513,7 @@ In some kernel configurations, the semantics of pages part of a larger
allocation (e.g., THP) can differ: a page is accounted as "private" if all
pages part of the corresponding large allocation are *certainly* mapped in the
same process, even if the page is mapped multiple times in that process. A
-page is accounted as "shared" if any page page of the larger allocation
+page is accounted as "shared" if any page of the larger allocation
is *maybe* mapped in a different process. In some cases, a large allocation
might be treated as "maybe mapped by multiple processes" even though this
is no longer the case.
base-commit: 1229e2e57a5c2980ccd457b9b53ea0eed5a22ab3
--
2.55.0
^ permalink raw reply related
* Re: [PATCH 2/5] Documentation: admin-guide: fix trailing whitespace in cgroup-v2.rst
From: Weijie Yuan @ 2026-07-18 16:32 UTC (permalink / raw)
To: Randy Dunlap
Cc: Yahya Toubali, Tejun Heo, Johannes Weiner, Michal Koutný,
Jonathan Corbet, Shuah Khan, open list:CONTROL GROUP (CGROUP),
open list:DOCUMENTATION, open list
In-Reply-To: <c8ef86b1-3ed9-47f7-9c1d-f9a0b0676bc0@infradead.org>
On Sat, Jul 18, 2026 at 09:16:29AM -0700, Randy Dunlap wrote:
>
>
> On 7/18/26 9:14 AM, Weijie Yuan wrote:
> > On Sat, Jul 18, 2026 at 04:19:08PM +0100, Yahya Toubali wrote:
> >> Remove trailing spaces on lines 1335 and 2197.
> >>
> >> Signed-off-by: Yahya Toubali <yahya@yahyatoubali.me>
> >
> > Hmmm, for a file that might be modified, I wonder if it makes sense to
> > include fixed line numbers in the commit message. i.e. When the line
> > number changes, your commit message will become meaningless.
> >
> > I'd love to hear others' comments.
>
> I wouldn't include the line numbers...
Alright, it seems that Yahya needs to refine his commit message.
Thanks.
^ permalink raw reply
* Re: [PATCH 2/5] Documentation: admin-guide: fix trailing whitespace in cgroup-v2.rst
From: Randy Dunlap @ 2026-07-18 16:16 UTC (permalink / raw)
To: Weijie Yuan, Yahya Toubali
Cc: Tejun Heo, Johannes Weiner, Michal Koutný, Jonathan Corbet,
Shuah Khan, open list:CONTROL GROUP (CGROUP),
open list:DOCUMENTATION, open list
In-Reply-To: <alumXzlDApA_iMbY@wyuan.org>
On 7/18/26 9:14 AM, Weijie Yuan wrote:
> On Sat, Jul 18, 2026 at 04:19:08PM +0100, Yahya Toubali wrote:
>> Remove trailing spaces on lines 1335 and 2197.
>>
>> Signed-off-by: Yahya Toubali <yahya@yahyatoubali.me>
>
> Hmmm, for a file that might be modified, I wonder if it makes sense to
> include fixed line numbers in the commit message. i.e. When the line
> number changes, your commit message will become meaningless.
>
> I'd love to hear others' comments.
I wouldn't include the line numbers...
>> ---
>> Documentation/admin-guide/cgroup-v2.rst | 5 +++--
>> 1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst
>> index 14b8c571c0d1..f15a613fed6a 100644
>> --- a/Documentation/admin-guide/cgroup-v2.rst
>> +++ b/Documentation/admin-guide/cgroup-v2.rst
>> @@ -1,4 +1,5 @@
>> .. _cgroup-v2:
>> +.. SPDX-License-Identifier: GPL-2.0
>>
>> ================
>> Control Group v2
>> @@ -1332,7 +1333,7 @@ PAGE_SIZE multiple when read back.
>> cgroup is within its effective low boundary, the cgroup's
>> memory won't be reclaimed unless there is no reclaimable
>> memory available in unprotected cgroups.
>> - Above the effective low boundary (or
>> + Above the effective low boundary (or
>> effective min boundary if it is higher), pages are reclaimed
>> proportionally to the overage, reducing reclaim pressure for
>> smaller overages.
>> @@ -2194,7 +2195,7 @@ of the two is enforced.
>>
>> cgroup writeback requires explicit support from the underlying
>> filesystem. Currently, cgroup writeback is implemented on ext2, ext4,
>> -btrfs, f2fs, and xfs. On other filesystems, all writeback IOs are
>> +btrfs, f2fs, and xfs. On other filesystems, all writeback IOs are
>> attributed to the root cgroup.
>>
>> There are inherent differences in memory and writeback management
>
--
~Randy
^ permalink raw reply
* Re: [PATCH 2/5] Documentation: admin-guide: fix trailing whitespace in cgroup-v2.rst
From: Weijie Yuan @ 2026-07-18 16:14 UTC (permalink / raw)
To: Yahya Toubali
Cc: Tejun Heo, Johannes Weiner, Michal Koutný, Jonathan Corbet,
Shuah Khan, open list:CONTROL GROUP (CGROUP),
open list:DOCUMENTATION, open list
In-Reply-To: <20260718151913.1892547-2-yahya@yahyatoubali.me>
On Sat, Jul 18, 2026 at 04:19:08PM +0100, Yahya Toubali wrote:
> Remove trailing spaces on lines 1335 and 2197.
>
> Signed-off-by: Yahya Toubali <yahya@yahyatoubali.me>
Hmmm, for a file that might be modified, I wonder if it makes sense to
include fixed line numbers in the commit message. i.e. When the line
number changes, your commit message will become meaningless.
I'd love to hear others' comments.
Thanks.
> ---
> Documentation/admin-guide/cgroup-v2.rst | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst
> index 14b8c571c0d1..f15a613fed6a 100644
> --- a/Documentation/admin-guide/cgroup-v2.rst
> +++ b/Documentation/admin-guide/cgroup-v2.rst
> @@ -1,4 +1,5 @@
> .. _cgroup-v2:
> +.. SPDX-License-Identifier: GPL-2.0
>
> ================
> Control Group v2
> @@ -1332,7 +1333,7 @@ PAGE_SIZE multiple when read back.
> cgroup is within its effective low boundary, the cgroup's
> memory won't be reclaimed unless there is no reclaimable
> memory available in unprotected cgroups.
> - Above the effective low boundary (or
> + Above the effective low boundary (or
> effective min boundary if it is higher), pages are reclaimed
> proportionally to the overage, reducing reclaim pressure for
> smaller overages.
> @@ -2194,7 +2195,7 @@ of the two is enforced.
>
> cgroup writeback requires explicit support from the underlying
> filesystem. Currently, cgroup writeback is implemented on ext2, ext4,
> -btrfs, f2fs, and xfs. On other filesystems, all writeback IOs are
> +btrfs, f2fs, and xfs. On other filesystems, all writeback IOs are
> attributed to the root cgroup.
>
> There are inherent differences in memory and writeback management
^ permalink raw reply
* Re: [PATCH 4/5] Documentation: fix spelling typos
From: Weijie Yuan @ 2026-07-18 16:07 UTC (permalink / raw)
To: Yahya Toubali
Cc: Jonathan Corbet, Shuah Khan, Mark Pearson, Derek J. Clark,
Armin Wolf, open list:DOCUMENTATION, open list,
open list:LENOVO drivers
In-Reply-To: <20260718151913.1892547-4-yahya@yahyatoubali.me>
On Sat, Jul 18, 2026 at 04:19:10PM +0100, Yahya Toubali wrote:
> Fix 'Minumum' -> 'Minimum' in lenovo-wmi-other.rst and 'maintainance' -> 'maintenance' in housekeeping.rst.
>
> Signed-off-by: Yahya Toubali <yahya@yahyatoubali.me>
Hi Yahya,
It's better to wrap your commit message to ~72 columns.
See:
https://docs.kernel.org/process/submitting-patches.html#subject-line
Thanks.
^ permalink raw reply
* [PATCH 5/5] Documentation: add SPDX license identifiers to RST files
From: Yahya Toubali @ 2026-07-18 15:19 UTC (permalink / raw)
To: Jonathan Corbet, Shuah Khan, Jaroslav Kysela, Takashi Iwai,
open list:DOCUMENTATION, open list,
open list:DOCUMENTATION PROCESS, open list:SOUND
Cc: Yahya Toubali
In-Reply-To: <20260718151913.1892547-1-yahya@yahyatoubali.me>
Add SPDX-License-Identifier: GPL-2.0 to documentation files that were missing it.
Signed-off-by: Yahya Toubali <yahya@yahyatoubali.me>
---
Documentation/core-api/memory-allocation.rst | 1 +
Documentation/doc-guide/sphinx.rst | 1 +
Documentation/process/5.Posting.rst | 1 +
Documentation/process/howto.rst | 1 +
Documentation/sound/designs/index.rst | 2 ++
5 files changed, 6 insertions(+)
diff --git a/Documentation/core-api/memory-allocation.rst b/Documentation/core-api/memory-allocation.rst
index 0f19dd524323..370f5a0c4238 100644
--- a/Documentation/core-api/memory-allocation.rst
+++ b/Documentation/core-api/memory-allocation.rst
@@ -1,4 +1,5 @@
.. _memory_allocation:
+.. SPDX-License-Identifier: GPL-2.0
=======================
Memory Allocation Guide
diff --git a/Documentation/doc-guide/sphinx.rst b/Documentation/doc-guide/sphinx.rst
index 51c370260f3b..74a3425e81c9 100644
--- a/Documentation/doc-guide/sphinx.rst
+++ b/Documentation/doc-guide/sphinx.rst
@@ -1,4 +1,5 @@
.. _sphinxdoc:
+.. SPDX-License-Identifier: GPL-2.0
=====================================
Using Sphinx for kernel documentation
diff --git a/Documentation/process/5.Posting.rst b/Documentation/process/5.Posting.rst
index 07d7dbed13ec..510abeea8977 100644
--- a/Documentation/process/5.Posting.rst
+++ b/Documentation/process/5.Posting.rst
@@ -1,4 +1,5 @@
.. _development_posting:
+.. SPDX-License-Identifier: GPL-2.0
Posting patches
===============
diff --git a/Documentation/process/howto.rst b/Documentation/process/howto.rst
index 9438e03d6f50..9001024e44cf 100644
--- a/Documentation/process/howto.rst
+++ b/Documentation/process/howto.rst
@@ -1,4 +1,5 @@
.. _process_howto:
+.. SPDX-License-Identifier: GPL-2.0
HOWTO do Linux kernel development
=================================
diff --git a/Documentation/sound/designs/index.rst b/Documentation/sound/designs/index.rst
index 6b825c5617fc..4ba4038187b5 100644
--- a/Documentation/sound/designs/index.rst
+++ b/Documentation/sound/designs/index.rst
@@ -1,3 +1,5 @@
+.. SPDX-License-Identifier: GPL-2.0
+
Designs and Implementations
===========================
--
2.55.0
^ permalink raw reply related
* [PATCH 4/5] Documentation: fix spelling typos
From: Yahya Toubali @ 2026-07-18 15:19 UTC (permalink / raw)
To: Jonathan Corbet, Shuah Khan, Mark Pearson, Derek J. Clark,
Armin Wolf, open list:DOCUMENTATION, open list,
open list:LENOVO drivers
Cc: Yahya Toubali
In-Reply-To: <20260718151913.1892547-1-yahya@yahyatoubali.me>
Fix 'Minumum' -> 'Minimum' in lenovo-wmi-other.rst and 'maintainance' -> 'maintenance' in housekeeping.rst.
Signed-off-by: Yahya Toubali <yahya@yahyatoubali.me>
---
Documentation/core-api/housekeeping.rst | 4 +++-
Documentation/wmi/devices/lenovo-wmi-other.rst | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/Documentation/core-api/housekeeping.rst b/Documentation/core-api/housekeeping.rst
index ccb0a88b9cb3..f4dc5f9337b1 100644
--- a/Documentation/core-api/housekeeping.rst
+++ b/Documentation/core-api/housekeeping.rst
@@ -1,3 +1,5 @@
+.. SPDX-License-Identifier: GPL-2.0
+
======================================
Housekeeping
======================================
@@ -9,7 +11,7 @@ extreme workloads can't stand, such as in some DPDK usecases.
The kernel work moved away by CPU isolation is commonly described as
"housekeeping" because it includes ground work that performs cleanups,
-statistics maintainance and actions relying on them, memory release,
+statistics maintenance and actions relying on them, memory release,
various deferrals etc...
Sometimes housekeeping is just some unbound work (unbound workqueues,
diff --git a/Documentation/wmi/devices/lenovo-wmi-other.rst b/Documentation/wmi/devices/lenovo-wmi-other.rst
index 011054d64eac..65cb78ef285a 100644
--- a/Documentation/wmi/devices/lenovo-wmi-other.rst
+++ b/Documentation/wmi/devices/lenovo-wmi-other.rst
@@ -163,5 +163,5 @@ data using the `bmfdec <https://github.com/pali/bmfdec>`_ utility:
[WmiDataId(1), read, Description("Mode.")] uint32 NumOfFans;
[WmiDataId(2), read, Description("Fan ID."), WmiSizeIs("NumOfFans")] uint32 FanId[];
[WmiDataId(3), read, Description("Maximum Fan Speed."), WmiSizeIs("NumOfFans")] uint32 FanMaxSpeed[];
- [WmiDataId(4), read, Description("Minumum Fan Speed."), WmiSizeIs("NumOfFans")] uint32 FanMinSpeed[];
+ [WmiDataId(4), read, Description("Minimum Fan Speed."), WmiSizeIs("NumOfFans")] uint32 FanMinSpeed[];
};
--
2.55.0
^ permalink raw reply related
* [PATCH 2/5] Documentation: admin-guide: fix trailing whitespace in cgroup-v2.rst
From: Yahya Toubali @ 2026-07-18 15:19 UTC (permalink / raw)
To: Tejun Heo, Johannes Weiner, Michal Koutný, Jonathan Corbet,
Shuah Khan, open list:CONTROL GROUP (CGROUP),
open list:DOCUMENTATION, open list
Cc: Yahya Toubali
In-Reply-To: <20260718151913.1892547-1-yahya@yahyatoubali.me>
Remove trailing spaces on lines 1335 and 2197.
Signed-off-by: Yahya Toubali <yahya@yahyatoubali.me>
---
Documentation/admin-guide/cgroup-v2.rst | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst
index 14b8c571c0d1..f15a613fed6a 100644
--- a/Documentation/admin-guide/cgroup-v2.rst
+++ b/Documentation/admin-guide/cgroup-v2.rst
@@ -1,4 +1,5 @@
.. _cgroup-v2:
+.. SPDX-License-Identifier: GPL-2.0
================
Control Group v2
@@ -1332,7 +1333,7 @@ PAGE_SIZE multiple when read back.
cgroup is within its effective low boundary, the cgroup's
memory won't be reclaimed unless there is no reclaimable
memory available in unprotected cgroups.
- Above the effective low boundary (or
+ Above the effective low boundary (or
effective min boundary if it is higher), pages are reclaimed
proportionally to the overage, reducing reclaim pressure for
smaller overages.
@@ -2194,7 +2195,7 @@ of the two is enforced.
cgroup writeback requires explicit support from the underlying
filesystem. Currently, cgroup writeback is implemented on ext2, ext4,
-btrfs, f2fs, and xfs. On other filesystems, all writeback IOs are
+btrfs, f2fs, and xfs. On other filesystems, all writeback IOs are
attributed to the root cgroup.
There are inherent differences in memory and writeback management
--
2.55.0
^ permalink raw reply related
* [PATCH 1/5] Documentation: proc: fix repeated word 'page'
From: Yahya Toubali @ 2026-07-18 15:19 UTC (permalink / raw)
To: Jonathan Corbet, Shuah Khan, open list:PROC FILESYSTEM,
open list:PROC FILESYSTEM, open list:DOCUMENTATION
Cc: Yahya Toubali
Remove duplicate 'page' in the large allocation accounting description.
Signed-off-by: Yahya Toubali <yahya@yahyatoubali.me>
---
Documentation/filesystems/proc.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/filesystems/proc.rst b/Documentation/filesystems/proc.rst
index 2ccd5b2dfdd3..d22ac0addd42 100644
--- a/Documentation/filesystems/proc.rst
+++ b/Documentation/filesystems/proc.rst
@@ -513,7 +513,7 @@ In some kernel configurations, the semantics of pages part of a larger
allocation (e.g., THP) can differ: a page is accounted as "private" if all
pages part of the corresponding large allocation are *certainly* mapped in the
same process, even if the page is mapped multiple times in that process. A
-page is accounted as "shared" if any page page of the larger allocation
+page is accounted as "shared" if any page of the larger allocation
is *maybe* mapped in a different process. In some cases, a large allocation
might be treated as "maybe mapped by multiple processes" even though this
is no longer the case.
--
2.55.0
^ permalink raw reply related
* Re: [PATCH v21 0/2] ACPI: Add support for ACPI RAS2 feature table
From: Borislav Petkov @ 2026-07-18 15:12 UTC (permalink / raw)
To: shijujose2008
Cc: rafael, akpm, rppt, dferguson, linux-edac, linux-acpi, linux-mm,
linux-doc, tony.luck, lenb, leo.duran, Yazen.Ghannam, mchehab,
jic23, linuxarm, rientjes, jiaqiyan, Jon.Grimm, dave.hansen,
naoya.horiguchi, james.morse, jthoughton, somasundaram.a,
erdemaktas, pgonda, duenwen, gthelen, wschwartz, wbs, nifan.cxl,
tanxiaofei, prime.zeng, roberto.sassu, kangkang.shen,
wanghuiqiang
In-Reply-To: <20260706000338.362421-1-shijujose2008@gmail.com>
On Mon, Jul 06, 2026 at 01:03:36AM +0100, shijujose2008@gmail.com wrote:
> From: Shiju Jose <shijujose2008@gmail.com>
>
> Add support for ACPI RAS2 feature table (RAS2) defined in the
> ACPI 6.5 specification, section 5.2.21 and RAS2 HW based memory
> scrubbing feature.
Sashiko is asking more questions:
https://sashiko.dev/#/patchset/20260706000338.362421-1-shijujose2008%40gmail.com
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
^ permalink raw reply
* Re: [PATCH 5/5] Documentation: add SPDX license identifiers to RST files
From: Greg KH @ 2026-07-18 14:50 UTC (permalink / raw)
To: Yahya Toubali
Cc: Jonathan Corbet, Shuah Khan, Jaroslav Kysela, Takashi Iwai,
open list:DOCUMENTATION, open list,
open list:DOCUMENTATION PROCESS, open list:SOUND
In-Reply-To: <20260718144005.1880568-1-yahya@yahyatoubali.me>
On Sat, Jul 18, 2026 at 03:40:04PM +0100, Yahya Toubali wrote:
> Add SPDX-License-Identifier: GPL-2.0 to documentation files that were missing it.
> ---
> Documentation/core-api/memory-allocation.rst | 1 +
> Documentation/doc-guide/sphinx.rst | 1 +
> Documentation/process/5.Posting.rst | 1 +
> Documentation/process/howto.rst | 1 +
> Documentation/sound/designs/index.rst | 2 ++
> 5 files changed, 6 insertions(+)
Hi,
This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him
a patch that has triggered this response. He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created. Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.
You are receiving this message because of the following common error(s)
as indicated below:
- Your patch does not have a Signed-off-by: line. Please read the
kernel file, Documentation/process/submitting-patches.rst and resend
it after adding that line. Note, the line needs to be in the body of
the email, before the patch, not at the bottom of the patch or in the
email signature.
- You did not specify a description of why the patch is needed, or
possibly, any description at all, in the email body. Please read the
section entitled "The canonical patch format" in the kernel file,
Documentation/process/submitting-patches.rst for what is needed in
order to properly describe the change.
If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.
thanks,
greg k-h's patch email bot
^ permalink raw reply
* [PATCH 1/5] Documentation: proc: fix repeated word 'page'
From: Yahya Toubali @ 2026-07-18 14:39 UTC (permalink / raw)
To: Jonathan Corbet, Shuah Khan, open list:PROC FILESYSTEM,
open list:PROC FILESYSTEM, open list:DOCUMENTATION
Cc: Yahya Toubali
Remove duplicate 'page' in the large allocation accounting description.
---
Documentation/filesystems/proc.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/filesystems/proc.rst b/Documentation/filesystems/proc.rst
index 2ccd5b2dfdd3..d22ac0addd42 100644
--- a/Documentation/filesystems/proc.rst
+++ b/Documentation/filesystems/proc.rst
@@ -513,7 +513,7 @@ In some kernel configurations, the semantics of pages part of a larger
allocation (e.g., THP) can differ: a page is accounted as "private" if all
pages part of the corresponding large allocation are *certainly* mapped in the
same process, even if the page is mapped multiple times in that process. A
-page is accounted as "shared" if any page page of the larger allocation
+page is accounted as "shared" if any page of the larger allocation
is *maybe* mapped in a different process. In some cases, a large allocation
might be treated as "maybe mapped by multiple processes" even though this
is no longer the case.
--
2.55.0
^ permalink raw reply related
* [PATCH 5/5] Documentation: add SPDX license identifiers to RST files
From: Yahya Toubali @ 2026-07-18 14:40 UTC (permalink / raw)
To: Jonathan Corbet, Shuah Khan, Jaroslav Kysela, Takashi Iwai,
open list:DOCUMENTATION, open list,
open list:DOCUMENTATION PROCESS, open list:SOUND
Cc: Yahya Toubali
Add SPDX-License-Identifier: GPL-2.0 to documentation files that were missing it.
---
Documentation/core-api/memory-allocation.rst | 1 +
Documentation/doc-guide/sphinx.rst | 1 +
Documentation/process/5.Posting.rst | 1 +
Documentation/process/howto.rst | 1 +
Documentation/sound/designs/index.rst | 2 ++
5 files changed, 6 insertions(+)
diff --git a/Documentation/core-api/memory-allocation.rst b/Documentation/core-api/memory-allocation.rst
index 0f19dd524323..370f5a0c4238 100644
--- a/Documentation/core-api/memory-allocation.rst
+++ b/Documentation/core-api/memory-allocation.rst
@@ -1,4 +1,5 @@
.. _memory_allocation:
+.. SPDX-License-Identifier: GPL-2.0
=======================
Memory Allocation Guide
diff --git a/Documentation/doc-guide/sphinx.rst b/Documentation/doc-guide/sphinx.rst
index 51c370260f3b..74a3425e81c9 100644
--- a/Documentation/doc-guide/sphinx.rst
+++ b/Documentation/doc-guide/sphinx.rst
@@ -1,4 +1,5 @@
.. _sphinxdoc:
+.. SPDX-License-Identifier: GPL-2.0
=====================================
Using Sphinx for kernel documentation
diff --git a/Documentation/process/5.Posting.rst b/Documentation/process/5.Posting.rst
index 07d7dbed13ec..510abeea8977 100644
--- a/Documentation/process/5.Posting.rst
+++ b/Documentation/process/5.Posting.rst
@@ -1,4 +1,5 @@
.. _development_posting:
+.. SPDX-License-Identifier: GPL-2.0
Posting patches
===============
diff --git a/Documentation/process/howto.rst b/Documentation/process/howto.rst
index 9438e03d6f50..9001024e44cf 100644
--- a/Documentation/process/howto.rst
+++ b/Documentation/process/howto.rst
@@ -1,4 +1,5 @@
.. _process_howto:
+.. SPDX-License-Identifier: GPL-2.0
HOWTO do Linux kernel development
=================================
diff --git a/Documentation/sound/designs/index.rst b/Documentation/sound/designs/index.rst
index 6b825c5617fc..4ba4038187b5 100644
--- a/Documentation/sound/designs/index.rst
+++ b/Documentation/sound/designs/index.rst
@@ -1,3 +1,5 @@
+.. SPDX-License-Identifier: GPL-2.0
+
Designs and Implementations
===========================
--
2.55.0
^ permalink raw reply related
* [PATCH 4/5] Documentation: fix spelling typos
From: Yahya Toubali @ 2026-07-18 14:40 UTC (permalink / raw)
To: Jonathan Corbet, Shuah Khan, Mark Pearson, Derek J. Clark,
Armin Wolf, open list:DOCUMENTATION, open list,
open list:LENOVO drivers
Cc: Yahya Toubali
Fix 'Minumum' -> 'Minimum' in lenovo-wmi-other.rst and 'maintainance' -> 'maintenance' in housekeeping.rst.
---
Documentation/core-api/housekeeping.rst | 4 +++-
Documentation/wmi/devices/lenovo-wmi-other.rst | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/Documentation/core-api/housekeeping.rst b/Documentation/core-api/housekeeping.rst
index ccb0a88b9cb3..f4dc5f9337b1 100644
--- a/Documentation/core-api/housekeeping.rst
+++ b/Documentation/core-api/housekeeping.rst
@@ -1,3 +1,5 @@
+.. SPDX-License-Identifier: GPL-2.0
+
======================================
Housekeeping
======================================
@@ -9,7 +11,7 @@ extreme workloads can't stand, such as in some DPDK usecases.
The kernel work moved away by CPU isolation is commonly described as
"housekeeping" because it includes ground work that performs cleanups,
-statistics maintainance and actions relying on them, memory release,
+statistics maintenance and actions relying on them, memory release,
various deferrals etc...
Sometimes housekeeping is just some unbound work (unbound workqueues,
diff --git a/Documentation/wmi/devices/lenovo-wmi-other.rst b/Documentation/wmi/devices/lenovo-wmi-other.rst
index 011054d64eac..65cb78ef285a 100644
--- a/Documentation/wmi/devices/lenovo-wmi-other.rst
+++ b/Documentation/wmi/devices/lenovo-wmi-other.rst
@@ -163,5 +163,5 @@ data using the `bmfdec <https://github.com/pali/bmfdec>`_ utility:
[WmiDataId(1), read, Description("Mode.")] uint32 NumOfFans;
[WmiDataId(2), read, Description("Fan ID."), WmiSizeIs("NumOfFans")] uint32 FanId[];
[WmiDataId(3), read, Description("Maximum Fan Speed."), WmiSizeIs("NumOfFans")] uint32 FanMaxSpeed[];
- [WmiDataId(4), read, Description("Minumum Fan Speed."), WmiSizeIs("NumOfFans")] uint32 FanMinSpeed[];
+ [WmiDataId(4), read, Description("Minimum Fan Speed."), WmiSizeIs("NumOfFans")] uint32 FanMinSpeed[];
};
--
2.55.0
^ permalink raw reply related
* [PATCH 2/5] Documentation: admin-guide: fix trailing whitespace in cgroup-v2.rst
From: Yahya Toubali @ 2026-07-18 14:40 UTC (permalink / raw)
To: Tejun Heo, Johannes Weiner, Michal Koutný, Jonathan Corbet,
Shuah Khan, open list:CONTROL GROUP (CGROUP),
open list:DOCUMENTATION, open list
Cc: Yahya Toubali
Remove trailing spaces on lines 1335 and 2197.
---
Documentation/admin-guide/cgroup-v2.rst | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst
index 14b8c571c0d1..f15a613fed6a 100644
--- a/Documentation/admin-guide/cgroup-v2.rst
+++ b/Documentation/admin-guide/cgroup-v2.rst
@@ -1,4 +1,5 @@
.. _cgroup-v2:
+.. SPDX-License-Identifier: GPL-2.0
================
Control Group v2
@@ -1332,7 +1333,7 @@ PAGE_SIZE multiple when read back.
cgroup is within its effective low boundary, the cgroup's
memory won't be reclaimed unless there is no reclaimable
memory available in unprotected cgroups.
- Above the effective low boundary (or
+ Above the effective low boundary (or
effective min boundary if it is higher), pages are reclaimed
proportionally to the overage, reducing reclaim pressure for
smaller overages.
@@ -2194,7 +2195,7 @@ of the two is enforced.
cgroup writeback requires explicit support from the underlying
filesystem. Currently, cgroup writeback is implemented on ext2, ext4,
-btrfs, f2fs, and xfs. On other filesystems, all writeback IOs are
+btrfs, f2fs, and xfs. On other filesystems, all writeback IOs are
attributed to the root cgroup.
There are inherent differences in memory and writeback management
--
2.55.0
^ permalink raw reply related
* Re: [PATCH v12 02/29] arm64/fpsimd: Update FA64 and ZT0 enables when loading SME state
From: Mark Brown @ 2026-07-18 14:24 UTC (permalink / raw)
To: Fuad Tabba
Cc: Mark Rutland, Marc Zyngier, Joey Gouly, Catalin Marinas,
Suzuki K Poulose, Will Deacon, Paolo Bonzini, Jonathan Corbet,
Shuah Khan, Oliver Upton, Dave Martin, Ben Horgan,
Jean-Philippe Brucker, linux-arm-kernel, kvmarm, linux-kernel,
kvm, linux-doc, linux-kselftest, Peter Maydell, Eric Auger
In-Reply-To: <CA+EHjTw9rGvQyev-4i7zkO5bPPZKGYn858485dCs8iHmCi0t3w@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1733 bytes --]
On Sat, Jul 18, 2026 at 02:30:04PM +0100, Fuad Tabba wrote:
> On Sat, 18 Jul 2026 at 01:35, Mark Brown <broonie@kernel.org> wrote:
> > Actually I remembered: while SCMR_EL1.LEN is self synchronising the
> > "without the need for explict synchronization" wording is not present
> > for SMCR_EL1.{FA64,EZT0} and this is no longer explicitly just an update
> > of LEN. It's possible I'm being overly paranoid here, I'll leave the
> > isb() and add a comment for the next version.
> I went through the ARM ARM (DDI 0487 M.c) on this and I don't think
> you're being overly paranoid, I believe the isb() is needed here.
Thanks for double checking so thoroughly.
> And task_fpsimd_load() does make indirect reads of both fields before
> the next context synchronization event: sme_load_state() executes LDR
> ZT0, whose execution at EL1 is trapped when SMCR_EL1.EZT0 is 0, and
> when PSTATE.SM is set sve_load_state() executes WRFFR, which is
> "illegal when executed in Streaming SVE mode, unless FEAT_SME_FA64 is
> implemented and enabled" (from the WRFFR description). The MSR SVCR in
> between doesn't provide the synchronization, since SVCR's
> self-synchronisation wording covers reads of its own SM and ZA fields
> only.
Yeah. We should be able to optimise this:
- If there is no change we don't need the isb().
- If only EZT0 changes and we load state where ZA is disabled then we
won't try to access ZT0.
- If only FA64 changes and we load state where streaming mode is
disabled then we won't try to access streaming mode FFR.
I've gone and implemented the first which will suppress the isb() for
current host kernel SME usage, the second two are starting to get more
fiddly than seems sensible to do right now.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply
* Re: [PATCH v12 02/29] arm64/fpsimd: Update FA64 and ZT0 enables when loading SME state
From: Fuad Tabba @ 2026-07-18 13:30 UTC (permalink / raw)
To: Mark Brown
Cc: Mark Rutland, Marc Zyngier, Joey Gouly, Catalin Marinas,
Suzuki K Poulose, Will Deacon, Paolo Bonzini, Jonathan Corbet,
Shuah Khan, Oliver Upton, Dave Martin, Ben Horgan,
Jean-Philippe Brucker, linux-arm-kernel, kvmarm, linux-kernel,
kvm, linux-doc, linux-kselftest, Peter Maydell, Eric Auger
In-Reply-To: <3c76650f-ddda-47ae-a676-86016d8e39a6@sirena.org.uk>
On Sat, 18 Jul 2026 at 01:35, Mark Brown <broonie@kernel.org> wrote:
>
> On Thu, Jul 16, 2026 at 04:28:02PM +0100, Mark Brown wrote:
> > On Thu, Jul 16, 2026 at 11:52:36AM +0100, Mark Rutland wrote:
>
> > > > if (test_thread_flag(TIF_SME)) {
> > > > - unsigned long vq = sve_vq_from_vl(sme_vl);
> > > > - sysreg_clear_set_s(SYS_SMCR_EL1, SMCR_ELx_LEN, vq - 1);
> > > > + sysreg_cond_update_s(SYS_SMCR_EL1, task_smcr(current));
> > > > + isb();
> > > > }
>
> > > What's the ISB for? That mysteriously appeared in v11 without
> > > explanation. It wasn't in the original code, prior versions of the
> > > series, or my suggested rework with the task_smcr() helper.
>
> > > I don't believe it's necessary to add an ISB here.
>
> > I can't remember or figure it out, I'll delete.
>
> Actually I remembered: while SCMR_EL1.LEN is self synchronising the
> "without the need for explict synchronization" wording is not present
> for SMCR_EL1.{FA64,EZT0} and this is no longer explicitly just an update
> of LEN. It's possible I'm being overly paranoid here, I'll leave the
> isb() and add a comment for the next version.
I went through the ARM ARM (DDI 0487 M.c) on this and I don't think
you're being overly paranoid, I believe the isb() is needed here.
The self-synchronisation wording in the SMCR_EL1 description is
attached to the LEN field only: "An indirect read of SMCR_EL1.LEN
appears to occur in program order relative to a direct write of the
same register, without the need for explicit synchronization." There
is no equivalent wording for FA64 or EZT0, so they fall under the
general rule in D24.1.2.2: "Unless otherwise stated in its System
register definition, a direct write to a System register requires
synchronization before software can rely on the effects of that write
to affect instructions appearing in program order after the write."
Table D24-1 has direct write -> indirect read as "Required".
And task_fpsimd_load() does make indirect reads of both fields before
the next context synchronization event: sme_load_state() executes LDR
ZT0, whose execution at EL1 is trapped when SMCR_EL1.EZT0 is 0, and
when PSTATE.SM is set sve_load_state() executes WRFFR, which is
"illegal when executed in Streaming SVE mode, unless FEAT_SME_FA64 is
implemented and enabled" (from the WRFFR description). The MSR SVCR in
between doesn't provide the synchronization, since SVCR's
self-synchronisation wording covers reads of its own SM and ZA fields
only.
When the write does change FA64 or EZT0 (once KVM can disable them for
a guest, and possibly on the return from suspend path now that
sme_suspend_exit() no longer writes them), K1.2.4 "CONSTRAINED
UNPREDICTABLE behavior due to inadequate context synchronization"
applies without the isb(): "the behavior of the PE is consistent with
the unsynchronized control value being either the old value or the new
value", independently per use. So the ZT0 load or the FFR restore
could take an unexpected SME trap (EC 0x1D) in the kernel, depending
on the implementation.
FWIW the other call sites look consistent with only this one needing
it: in do_sme_acc() nothing ZT0 or FFR gated executes before the ERET,
which is the context synchronization event, and ZCR_EL1 only has LEN
allocated.
Cheers,
/fuad
^ permalink raw reply
* Re: [PATCH 3/3] tools/accounting: simplify 32-bit time_t overflow check in format_timespec()
From: xu.xin16 @ 2026-07-18 13:28 UTC (permalink / raw)
To: wang.yaxin
Cc: wang.yaxin, akpm, fan.yu9, yang.yang29, corbet, linux-kernel,
linux-doc
In-Reply-To: <20260718133822444iLo8o-zXcS91NMNEg17Gv@zte.com.cn>
> From: Wang Yaxin <wang.yaxin@zte.com.cn>
>
> Replace the Y2038 overflow guard in format_timespec() with a direct
> narrowing truncation check ((long long)time_sec != ts->tv_sec), which
> is both simpler and more robust across platforms. Also move the
> time_sec assignment earlier to avoid duplication.
>
> While at it, fix a minor alignment issue in delaytop.c by adding a
> leading space to the output format string.
>
> Signed-off-by: Wang Yaxin <wang.yaxin@zte.com.cn>
Acked-by: Xu Xin <xu.xin16@zte.com.cn>
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox