Skip to content

Commit f7fd6b8

Browse files
adamkondraciukdkalowsk
authored andcommitted
soc: nordic: s2ram: Optimize s2am marking functions
Optimize `pm_s2ram_mark_check_and_clear()` function. Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
1 parent 394f3c7 commit f7fd6b8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

soc/nordic/nrf54h/pm_s2ram.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,18 +187,16 @@ void pm_s2ram_mark_set(void)
187187

188188
bool pm_s2ram_mark_check_and_clear(void)
189189
{
190-
bool unretained_wake;
191190
bool restore_valid;
192191
uint32_t reset_reason = nrf_resetinfo_resetreas_local_get(NRF_RESETINFO);
193192

194193
if (reset_reason != NRF_RESETINFO_RESETREAS_LOCAL_UNRETAINED_MASK) {
195194
return false;
196195
}
197-
unretained_wake = reset_reason & NRF_RESETINFO_RESETREAS_LOCAL_UNRETAINED_MASK;
198196
nrf_resetinfo_resetreas_local_set(NRF_RESETINFO, 0);
199197

200198
restore_valid = nrf_resetinfo_restore_valid_check(NRF_RESETINFO);
201199
nrf_resetinfo_restore_valid_set(NRF_RESETINFO, false);
202200

203-
return (unretained_wake & restore_valid) ? true : false;
201+
return restore_valid;
204202
}

0 commit comments

Comments
 (0)