Commit eb68cf09 authored by Alex Elder's avatar Alex Elder Committed by Andy Gross

soc: qcom: smem: small refactor in qcom_smem_enumerate_partitions()

Combine the code that checks whether a partition table entry is
associated with the local host with the assignment of the remote
host id value.
Signed-off-by: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarAndy Gross <andy.gross@linaro.org>
parent eba75702
......@@ -816,13 +816,12 @@ static int qcom_smem_enumerate_partitions(struct qcom_smem *smem,
host0 = le16_to_cpu(entry->host0);
host1 = le16_to_cpu(entry->host1);
if (host0 != local_host && host1 != local_host)
continue;
if (host0 == local_host)
remote_host = host1;
else
else if (host1 == local_host)
remote_host = host0;
else
continue;
if (remote_host >= SMEM_HOST_COUNT) {
dev_err(smem->dev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment