From: Alex Elder Date: Tue, 26 Jun 2018 00:58:48 +0000 (-0500) Subject: soc: qcom: smem: small refactor in qcom_smem_enumerate_partitions() X-Git-Tag: v5.15~7691^2~7^2^2~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eb68cf09092233716b31fad42cf2a4dad3959e3c;p=platform%2Fkernel%2Flinux-starfive.git 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: Alex Elder Signed-off-by: Andy Gross --- diff --git a/drivers/soc/qcom/smem.c b/drivers/soc/qcom/smem.c index 9378bee..8d2582c 100644 --- a/drivers/soc/qcom/smem.c +++ b/drivers/soc/qcom/smem.c @@ -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,