]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
soc: qcom: smem: small change in global entry loop
authorAlex Elder <elder@linaro.org>
Tue, 26 Jun 2018 00:58:54 +0000 (19:58 -0500)
committerAndy Gross <andy.gross@linaro.org>
Thu, 13 Sep 2018 21:57:08 +0000 (16:57 -0500)
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>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
drivers/soc/qcom/smem.c

index a94888c26e18c161cc111d661d17fbd12120fa2e..5b5cf45e2ef743cfe0397e9edf5029fbac61e806 100644 (file)
@@ -785,9 +785,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;
                }