init: Refactor check_restore to return bool

This patch refactors the `check_restore` function to return a `bool`
instead of an `int`. This change enhances code readability and clarifies
the intent of the function, which is to return a true or false value
based on the presence of core structures in memory.

No functional changes are introduced by this patch; it is purely a code
quality improvement.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
This commit is contained in:
Tomasz Leman 2024-04-09 10:48:43 +02:00 committed by Liam Girdwood
parent 00ab55462c
commit c159c1fa35
1 changed files with 2 additions and 5 deletions

View File

@ -89,7 +89,7 @@ static inline void lp_sram_unpack(void)
#ifndef __ZEPHYR__
static int check_restore(void)
static bool check_restore(void)
{
struct idc *idc = *idc_get();
struct task *task = *task_main_get();
@ -100,10 +100,7 @@ static int check_restore(void)
* are available in memory, it means that this is not cold boot and memory
* has not been powered off.
*/
if (!idc || !task || !notifier || !schedulers)
return 0;
return 1;
return !!idc && !!task && !!notifier && !!schedulers;
}
static int secondary_core_restore(void)