From: Alex Elder Date: Tue, 26 Jun 2018 00:58:54 +0000 (-0500) Subject: soc: qcom: smem: small change in global entry loop X-Git-Tag: v4.20-rc1~64^2~7^2^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33fdbc4e5caf7ef6e7114adeab7a4a4578307ff3;p=thirdparty%2Fkernel%2Flinux.git soc: qcom: smem: small change in global entry loop 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 Signed-off-by: Andy Gross --- diff --git a/drivers/soc/qcom/smem.c b/drivers/soc/qcom/smem.c index a94888c26e18c..5b5cf45e2ef74 100644 --- a/drivers/soc/qcom/smem.c +++ b/drivers/soc/qcom/smem.c @@ -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; }