refactor(core): the "int backlight_level" member of struct "power_save_wakeup_params_t" has been refactored to "uin8_t data type" in order to ensure consistency throughout the whole codebase.
What changed, and why it matters
This is a minor code cleanup that changes a single variable type from a signed integer to an unsigned 8-bit integer. It does not fix a security bug and does not introduce any obvious security risk. The change is purely for internal consistency in how backlight brightness levels are represented.
No security action required. Treat as normal refactoring.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit refactors the backlight_level member of power_save_wakeup_params_t from int to uint8_t. This matches the typical representation of backlight levels elsewhere in the codebase and is a type-narrowing refactor. There is no functional change to logic, no bounds-checking addition or removal, and no security-relevant behavior change visible in the diff.
Changed components
core/embed/sys/suspend/inc/sys/suspend_io.hInspect captured patch +1 / −1
diff --git a/core/embed/sys/suspend/inc/sys/suspend_io.h b/core/embed/sys/suspend/inc/sys/suspend_io.h
index b5f962eba..d63739dcf 100644
--- a/core/embed/sys/suspend/inc/sys/suspend_io.h
+++ b/core/embed/sys/suspend/inc/sys/suspend_io.h
@@ -42,7 +42,7 @@ void suspend_cpu(void);
typedef struct {
#ifdef USE_BACKLIGHT
/** Backlight level */
- int backlight_level;
+ uint8_t backlight_level;
#endif
#ifdef USE_BLE
/** State of the ble driver */
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.