From patchwork Wed May 2 01:10:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 134806 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp124265lji; Tue, 1 May 2018 18:11:17 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqvGHHetefAfDoQiG6Cs4H2KgEWDkJTpcF9J8dIpRy4W+mDX0EnYORwtMCQOKojH8kJv4+x X-Received: by 10.98.87.84 with SMTP id l81mr17555455pfb.56.1525223477384; Tue, 01 May 2018 18:11:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525223477; cv=none; d=google.com; s=arc-20160816; b=xAjUve0mlfp+S9U1QY9Bw+p0mnwcRGVtvQ+mfiGmNh9nakUEZbkTvpm5lH4q2be7G4 2v6H3khflWnnGdhSsu/2vIbAp326/ErlI3zZf9naooDN38uN3iFBmgqK+ahaWK1m25WD QJycYulyLaWURJVdVlAnlzHI94U91ppN8aGuZgLhCRXWSMQ3ZKkPT7dfPsqUy8iu6Ovv 78MaMLZz9fsTYNQQQisrzrOXWogGYe1BffBzvGTJ48P6Ff/QZdkkK0ty/1zZd610Avy8 Emf+7AjKK7CBQ0GxDbQ6zugG/42Jq7lURqUwVSbh96maw/VTp8CaAvBIDcbZ219bVr3j ljhQ== 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=dQ15NHDVyvrwZ/VNinJBFjezyZ8u6kEGM5Eewkig4Zc=; b=a8vQi8uHGZgyZvtWH/jePmyc1texxJvo1U57wRWG3AVgaGKoHQuMB6ZYBJEky1oRvK 43tXAKbFw8KrzlUoN/sU0xmHfLGzPZq7D8UNVTWC8BGKHOzRazZqjbucS9DeiHHPCkvq tTti0TnD4vESHZ50/636c14AQc/itRnhNRgwTg/jLd0XPeYH8pD0UUXC11neSdE9aavA xfdJUM6TgUVShklI4+YsuQh9AXlUVJexBz9c8NyTB2426INa/w/UID7M7arVuoE5bm2/ YzFYlOitDCXERNiF8PtXbfoGMZkoCiYATagdsk3swYOuiLw7RLsgycEaZKlqTXKQ8I68 h96g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Bj2eaQgq; 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 j26-v6si8725543pgn.326.2018.05.01.18.11.17; Tue, 01 May 2018 18:11:17 -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=Bj2eaQgq; 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 S1751454AbeEBBLO (ORCPT + 29 others); Tue, 1 May 2018 21:11:14 -0400 Received: from mail-it0-f68.google.com ([209.85.214.68]:55629 "EHLO mail-it0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751283AbeEBBKi (ORCPT ); Tue, 1 May 2018 21:10:38 -0400 Received: by mail-it0-f68.google.com with SMTP id 144-v6so15574716iti.5 for ; Tue, 01 May 2018 18:10:37 -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=dQ15NHDVyvrwZ/VNinJBFjezyZ8u6kEGM5Eewkig4Zc=; b=Bj2eaQgq9onUJQ7XP+Cdl02fn9w6nkylxMUaihGZ2qdBIEEHp20klqmpgh84hwJs5K Kf0x4hzHKJcCRY1V7haOf+4IagTeZyplY+ZZYTEe1h7GLkjXgmR30TaEG6MUsVNXvvWx WguIOE8bYms8TnxtX/laPXZMgpkWfXaUovza0= 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=dQ15NHDVyvrwZ/VNinJBFjezyZ8u6kEGM5Eewkig4Zc=; b=Z1MJfKZqsNoabSMBviks2qzPj4GHjNlG82sG0RA8aDDhaxQesU52MMQyws6r1wxEXK bxhLUmA2tyrhOr50jDz2NML18wFvaYzPK2adODN4OyJTIfE9v1625yK09mX/1Aw16Der QtK1IJoT309USoz6WjkbbrFVG+qS7E1uRPy3VcliDvFc7NjznmPLKGIrQiKKaNXZiLs+ q2A87OMHiAHN0utzKgFnY0g5BvTan66tS7J3WDq/XnXL5e4kIclQ0Ura4ey3B80pnJ6Y PraNn1N+JFzeQ0f7QXcJ2Z1IlszSFZXGlelPrAf9+VRKB8gfWgnQazxBT8SfIcsLPzYi TXkA== X-Gm-Message-State: ALQs6tASbkVqePz2Cije2EqNx6FL3HTbcA8NTdelj0O63j6Bh+2h5+0+ uCjsKsQPIA40ySqwtwaSWLWoNA== X-Received: by 2002:a24:9149:: with SMTP id i70-v6mr18193058ite.142.1525223437454; Tue, 01 May 2018 18:10:37 -0700 (PDT) Received: from presto.localdomain (c-71-195-29-92.hsd1.mn.comcast.net. [71.195.29.92]) by smtp.gmail.com with ESMTPSA id g200-v6sm2082479itb.26.2018.05.01.18.10.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 May 2018 18:10:37 -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 10/12] soc: qcom: smem: small change in global entry loop Date: Tue, 1 May 2018 20:10:17 -0500 Message-Id: <20180502011019.22812-11-elder@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180502011019.22812-1-elder@linaro.org> References: <20180502011019.22812-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.14.1 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; }