Skip to content

Commit d0331fe

Browse files
[nrf fromlist] soc: nordic: s2ram: Optimize s2am marking functions
Optimize `pm_s2ram_mark_check_and_clear()` function. Upstream PR #: 87304 Signed-off-by: Adam Kondraciuk <[email protected]>
1 parent 504a8ab commit d0331fe

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

soc/nordic/nrf54h/pm_s2ram.c

+1-3
Original file line numberDiff line numberDiff line change
@@ -184,18 +184,16 @@ void pm_s2ram_mark_set(void)
184184

185185
bool pm_s2ram_mark_check_and_clear(void)
186186
{
187-
bool unretained_wake;
188187
bool restore_valid;
189188
uint32_t reset_reason = nrf_resetinfo_resetreas_local_get(NRF_RESETINFO);
190189

191190
if (reset_reason != NRF_RESETINFO_RESETREAS_LOCAL_UNRETAINED_MASK) {
192191
return false;
193192
}
194-
unretained_wake = reset_reason & NRF_RESETINFO_RESETREAS_LOCAL_UNRETAINED_MASK;
195193
nrf_resetinfo_resetreas_local_set(NRF_RESETINFO, 0);
196194

197195
restore_valid = nrf_resetinfo_restore_valid_check(NRF_RESETINFO);
198196
nrf_resetinfo_restore_valid_set(NRF_RESETINFO, false);
199197

200-
return (unretained_wake & restore_valid) ? true : false;
198+
return restore_valid ? true : false;
201199
}

0 commit comments

Comments
 (0)