Skip to content

Commit

Permalink
idc: (cosmetic) simplify idc_msg_status_get()
Browse files Browse the repository at this point in the history
Simplify the return statement in idc_msg_status_get() and remove 2
excessive empty lines.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
  • Loading branch information
lyakh authored and kv2019i committed Nov 16, 2023
1 parent f8e3609 commit 20e7e31
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/idc/idc.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ static void idc_msg_status_set(int status, uint32_t core)
struct idc_payload *payload = idc_payload_get(idc, core);

*(uint32_t *)payload->data = status;

}

/**
Expand All @@ -78,12 +77,8 @@ int idc_msg_status_get(uint32_t core)
{
struct idc *idc = *idc_get();
struct idc_payload *payload = idc_payload_get(idc, core);
int status;

status = *(uint32_t *)payload->data;


return status;
return *(uint32_t *)payload->data;
}

/**
Expand All @@ -97,7 +92,6 @@ int idc_wait_in_blocking_mode(uint32_t target_core, bool (*cond)(int))
uint64_t deadline = sof_cycle_get_64() + k_us_to_cyc_ceil64(IDC_TIMEOUT);

while (!cond(target_core)) {

/* spin here so other core can access IO and timers freely */
idelay(8192);

Expand Down

0 comments on commit 20e7e31

Please sign in to comment.