diff options
author | Alex Elder <elder@linaro.org> | 2018-06-25 20:58:48 -0400 |
---|---|---|
committer | Andy Gross <andy.gross@linaro.org> | 2018-09-13 17:56:56 -0400 |
commit | eb68cf09092233716b31fad42cf2a4dad3959e3c (patch) | |
tree | 886cd6ec3910d47d533970f9caad2ce944f897a9 | |
parent | eba757022fc2935c8a1392278a26d86761a70c60 (diff) |
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 <elder@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
-rw-r--r-- | drivers/soc/qcom/smem.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/soc/qcom/smem.c b/drivers/soc/qcom/smem.c index 9378bee4d7d6..8d2582c99808 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, | |||
816 | 816 | ||
817 | host0 = le16_to_cpu(entry->host0); | 817 | host0 = le16_to_cpu(entry->host0); |
818 | host1 = le16_to_cpu(entry->host1); | 818 | host1 = le16_to_cpu(entry->host1); |
819 | if (host0 != local_host && host1 != local_host) | ||
820 | continue; | ||
821 | |||
822 | if (host0 == local_host) | 819 | if (host0 == local_host) |
823 | remote_host = host1; | 820 | remote_host = host1; |
824 | else | 821 | else if (host1 == local_host) |
825 | remote_host = host0; | 822 | remote_host = host0; |
823 | else | ||
824 | continue; | ||
826 | 825 | ||
827 | if (remote_host >= SMEM_HOST_COUNT) { | 826 | if (remote_host >= SMEM_HOST_COUNT) { |
828 | dev_err(smem->dev, | 827 | dev_err(smem->dev, |