From patchwork Tue Jun 26 00:58:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 139897 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp4615883lji; Mon, 25 Jun 2018 17:59:22 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJjkRnp+UPj6MduxLqNJ5gKEUIVy7wTmPSkjYv2nR/ZiRkrV5hwewyfQODFzzhST9nFELPY X-Received: by 2002:a62:968f:: with SMTP id s15-v6mr15107092pfk.191.1529974762517; Mon, 25 Jun 2018 17:59:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529974762; cv=none; d=google.com; s=arc-20160816; b=TTfHBHF3bbvyzJktSnvjoVZfiNqZMxdsKLhGTmepbrTF4QnT5JUnUReUp1S8unPMdZ ft1+dJA3LdAHdeVKgmcQhafnB86S2ImjBtpnNCNUbMXbg6b248241qE0xvEHoCGSD/MA PQkMfXhbO8adhL9l9fEQjGLaPVBmU424iypIVbKHSHo3665pwSZ08yPSpryWY5S/xqm+ MrQSaPgm+aeitKdqpKQjrlkgW7tTM4e0jNbz0iLJvDHgXhEtveOA6Q8AUNMLWYeQ1M8Z nO1WXQDwa4NLkEbl2udvAXeRNZ4F3nFxpfsY19RtTnJLpYj7bFsMzQ3kdoGyL94YLOlF TwbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=T4CUDx/3MI0mxSRgg3ZDgSPUHt20uXodH0yLTHynxPE=; b=R3fZFbSNE9j1IgLuda0Y0xKhoj9X632y3Ko/F6zlVvoJxQzR8icWHDbq7usq7pG8Oy E1K+VhE155MnN5PLz/I5vqhIlkFIX0L7y8IDQ6wvi2vuo83MkGMaQSyHFlfGuZf11gkp nX7HJC53LT3qLcGjgcWVgEdTGmwCBXMU/3qpKNbc4mc+v1ZWG3QMBvr4zmvnVURcFZRp HCRM9rRRDD9KLsx0BfQSP+r2gmr7cTwp0a4BWG4EPq7aqkUxfChgXPbJa6H/JWFS2lVg 2Ua5qa+joFqXcrGwk8sKEdHQErSEJ8AbwVEejo15D1pTmKAA9TXl38ze+G4X3sUFU30F jNnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YSdoX1rP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i11-v6si288658pgr.200.2018.06.25.17.59.22; Mon, 25 Jun 2018 17:59:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YSdoX1rP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935145AbeFZA7U (ORCPT + 31 others); Mon, 25 Jun 2018 20:59:20 -0400 Received: from mail-it0-f66.google.com ([209.85.214.66]:53206 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934965AbeFZA7L (ORCPT ); Mon, 25 Jun 2018 20:59:11 -0400 Received: by mail-it0-f66.google.com with SMTP id m194-v6so15208131itg.2 for ; Mon, 25 Jun 2018 17:59:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=T4CUDx/3MI0mxSRgg3ZDgSPUHt20uXodH0yLTHynxPE=; b=YSdoX1rPHCapO7bHzHg6fURu96OYAzv1qrrFa/3E8tlPxek7+KNsr/nHmwe1aNmFoG BAO/8/GBPVXeiKPk8DRYjlBWkhsyr9D8gtnfkOJnHjDFX8c7eP3UWdRtYjvAA6f/MH/6 wkkFNhj6djxqK7DOmYn10Abo6YStA3DunPZ+o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=T4CUDx/3MI0mxSRgg3ZDgSPUHt20uXodH0yLTHynxPE=; b=tAzlaK0HZnMZHJ46YmwH9VI8KOoL5G9cA5LkcgtA2XUh59XRhjMXpE6E+D//rZVp1E aRYXxicn4BIf2ZixcssljUy24fy7jO692p8cjKuONde8S7cET7pPL2ptonKRSrqVfjfA lSCPZMO/9T+c34vrNHj+QvD+kJRUGNonR9wkJ80NqRoD/W3fFAQsnbgduDmBRuSbb9Zt Gdqy4MmU8pGoCGbPAZ+C7775GMkHaSPGvz496zQ46MajhTnZzzKjOX7jhWfDZMW1BE+2 qEutG3qB/3VSlFlzDcgQ3B50cPPUJRoWPHh9g8J6g96TASnoivagu77QpdKSiYcAcabL Lz8A== X-Gm-Message-State: APt69E0ZXCsqY1WfuTVmSC0bolFHC0ymZDrcbxys79PCDaU9a+/b55yl 1MV2PqUEfYUmaSSvkKR5wMrcpg== X-Received: by 2002:a24:eb17:: with SMTP id h23-v6mr2648601itj.17.1529974750868; Mon, 25 Jun 2018 17:59:10 -0700 (PDT) Received: from localhost.localdomain (c-71-195-29-92.hsd1.mn.comcast.net. [71.195.29.92]) by smtp.gmail.com with ESMTPSA id f193-v6sm372556itf.9.2018.06.25.17.59.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jun 2018 17:59:10 -0700 (PDT) From: Alex Elder To: andy.gross@linaro.org Cc: clew@codeaurora.org, aneela@codeaurora.org, david.brown@linaro.org, linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH resend 10/12] soc: qcom: smem: small change in global entry loop Date: Mon, 25 Jun 2018 19:58:54 -0500 Message-Id: <20180626005856.14174-11-elder@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180626005856.14174-1-elder@linaro.org> References: <20180626005856.14174-1-elder@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/soc/qcom/smem.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) -- 2.17.1 diff --git a/drivers/soc/qcom/smem.c b/drivers/soc/qcom/smem.c index f5d7af1623a9..8597aa03232c 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; }