diff mbox series

[10/12] soc: qcom: smem: small change in global entry loop

Message ID 20180502011019.22812-11-elder@linaro.org
State Superseded
Headers show
Series [01/12] soc: qcom: smem: rename variable in qcom_smem_get_global() | expand

Commit Message

Alex Elder May 2, 2018, 1:10 a.m. UTC
Change the logic in the loop that finds that global host entry in
the partition table not require the host0 and host1 local variables.
The next patch will remove them.

Signed-off-by: Alex Elder <elder@linaro.org>

---
 drivers/soc/qcom/smem.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

-- 
2.14.1
diff mbox series

Patch

diff --git a/drivers/soc/qcom/smem.c b/drivers/soc/qcom/smem.c
index 7ef415c4d62e..54c504e41508 100644
--- a/drivers/soc/qcom/smem.c
+++ b/drivers/soc/qcom/smem.c
@@ -784,9 +784,10 @@  static int qcom_smem_set_global_partition(struct qcom_smem *smem)
 		if (!le32_to_cpu(entry->size))
 			continue;
 
-		host0 = le16_to_cpu(entry->host0);
-		host1 = le16_to_cpu(entry->host1);
-		if (host0 == SMEM_GLOBAL_HOST && host0 == host1) {
+		if (le16_to_cpu(entry->host0) != SMEM_GLOBAL_HOST)
+			continue;
+
+		if (le16_to_cpu(entry->host1) == SMEM_GLOBAL_HOST) {
 			found = true;
 			break;
 		}