AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 15 Bitcoin

refactor(core): gate the power manager's RTC dependency on USE_RTC

Public commit record

What the developer wrote

Authored by tychovrahe

100/100 · Strong
refactor(core): gate the power manager's RTC dependency on USE_RTC

`power_manager_internal.h` included `<sys/rtc_scheduler.h>` unconditionally
and declared `pm_driver_t.autohibernate_event_id` (an `rtc_event_id_t`) plus
`pm_schedule_rtc_wakeup()` outside any guard, while every actual RTC user in
the module is already `#ifdef USE_RTC`. The header therefore pulled the RTC
scheduler interface into builds that never call it.

No functional change: with `USE_RTC` set the preprocessed output is
identical, and with it unset no reference to the RTC scheduler remains.

Relevant because `rtc_schedule_wakeup_event()`/`rtc_cancel_wakeup_event()`
are implemented only for stm32u5, so this is a prerequisite for building the
`managed` policy anywhere else (e.g. a host unit test or an emulator built on
an emulated PMIC).

[no changelog]

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
The short version

What changed, and why it matters

This is a straightforward code cleanup: a header file now only includes real-time-clock (RTC) definitions when the feature is actually enabled. The commit explicitly states there is no functional change, and the diff shows only conditional compilation guards being added. There is no security issue here.

Recommended action

No security action required. Treat as normal refactoring/build fix.

Security signals we found

No strong security signals were identified.

Risk score

Why this scored 15/100

Our methodology →
Potential impact 0/30
Exploitability 0/25
Stealth signal 0/15
Affected reach 0/15
Confidence 10/10
Evidence quality 5/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.