From patchwork Wed May 2 01:10:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 134803 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp123963lji; Tue, 1 May 2018 18:10:49 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqsyk44QB+/ZaO2Rb1WE2ArFYbPvwbkFo6zDu1wWn7o9JYqEqGfc3/EcdUNIIrkWFvtzR9J X-Received: by 2002:a17:902:9349:: with SMTP id g9-v6mr16728926plp.375.1525223449439; Tue, 01 May 2018 18:10:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525223449; cv=none; d=google.com; s=arc-20160816; b=s91NG9wTqNjVREyvCwNHLo5Cjf8g6HSZlSpfa57D3sN20Vv0WGZIbOzwLdq4lqlfi2 YVUuutnssQ+hQpVZQ9V1h+Fa9gmS9qGeclqYThjPKU24v5fTxrHNHLf142+f8s0+AtMW G8xU8V1Jz7LvzZVG7Tab1MKA1a+jkbaCI/tnvXG1tz7Az+CVoF6Du4E1e17KQq9463bX sdHar3NvrlKEhe1zbyvYfgBGJ9C+LcaAgrTOox8i80KnuN/BjjFn5c21VlY3zvnT9b3D 5YwsZVnb0LKyjYjLFpO8WsbaWhYTIGZscsVPefL90fNAjks8q12WwUFo7qAPLKaewkZH ONeg== 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=fuLD3cG8NbFXLM2nfOqCxwmWEGM/nPa2Rcq/dZj1L+0=; b=Dran0DF4qGlmnXACwFUqq2JFDvVgiZow0MacsDO/4yXyHKuh/yrPjjyQnCBhU+mR2G 4rIjzhganKuPb1Dnl2hwxh6z0nA3hmIloeLtm4Cmo6ts1l8EtlTtoKQYJB/sxlQvFYug NkT0tfb6WJEfET55UhTDvzLd6GzG8+yOg+vEt4Jd77zrOJSXovlOr+m1KPeSB/fwZ8IF 3VGqqBV9Pzgq4ANGUWwuOWyo45Nnca5hy0niyaFsf7J+spWpbRMvXbhJUKP4xwcm6qrb XT3lfYVVajaR8NTB6QMeWTj0DTwvqLirR0mjWyAalhiRbi3zu0yCxQfBCi8EMh6NJ219 ytbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Wsk1SvDx; 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 g10-v6si10789274plb.272.2018.05.01.18.10.49; Tue, 01 May 2018 18:10:49 -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=Wsk1SvDx; 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 S1751382AbeEBBKm (ORCPT + 29 others); Tue, 1 May 2018 21:10:42 -0400 Received: from mail-io0-f194.google.com ([209.85.223.194]:36624 "EHLO mail-io0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751178AbeEBBKc (ORCPT ); Tue, 1 May 2018 21:10:32 -0400 Received: by mail-io0-f194.google.com with SMTP id d73-v6so15595213iog.3 for ; Tue, 01 May 2018 18:10:32 -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=fuLD3cG8NbFXLM2nfOqCxwmWEGM/nPa2Rcq/dZj1L+0=; b=Wsk1SvDx1lOaM/DuhW4RhS3oU2H7DzMFObdM7KxBOmTbnbmksWUI5fsJq/GQ4llJvv z4Wzb7YbDnEDlmPvH0kCiM7YLpaZK8mKtJI2XbVzJlOs1yY27x3/WDoZwKWx8lfF4He0 HM3xmvEdRj0mDxhqvUtLaGNPch5nOESlex7vY= 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=fuLD3cG8NbFXLM2nfOqCxwmWEGM/nPa2Rcq/dZj1L+0=; b=F22HeKJFYH4ULrcAK7PqGLOTmcdfcuf5xOGwsQfPNLFfq+lmEgIF/N3Z3WHUitEunV epsq6jhmbREMpd6xXDyETc4OvOIbBrizgVOPpk04FYPw/6ob5LYOymD3UfKKXwfMC609 a058dVd7T+scRGHrIE8USbQZBe7eh1Udg09SztvNRIe99Nk8gpAyEiQVucb9tVTDuE/h ykZJ0JzZHpFLqNmQWz3BjK/IAL7NuyIGUx4V2L6Sjx0Mh+vI+zTDHCMZDXmnsVpmoxsL WapKjZUbMrugBycDbhNJlegSFypIu5teQT1kYL03iVWAxUg4+O0oVZppb1YR5J4AtELI ZyZA== X-Gm-Message-State: ALQs6tDVA5wzGxVHCdtD9+PunWhdqblT3ZVa7rWn/U0+xVq5Zw9+H+wg seW79BLgJYxlGQ6QZTBhreG2Gg== X-Received: by 2002:a6b:9107:: with SMTP id t7-v6mr19661369iod.32.1525223431660; Tue, 01 May 2018 18:10:31 -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.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 May 2018 18:10:31 -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 04/12] soc: qcom: smem: small refactor in qcom_smem_enumerate_partitions() Date: Tue, 1 May 2018 20:10:11 -0500 Message-Id: <20180502011019.22812-5-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 Combine the code that checks whether a partition table entry is associated with the local host with the assignment of the remote host id value. Signed-off-by: Alex Elder --- drivers/soc/qcom/smem.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) -- 2.14.1 diff --git a/drivers/soc/qcom/smem.c b/drivers/soc/qcom/smem.c index 83ba549cfea0..5d3ed510e54b 100644 --- a/drivers/soc/qcom/smem.c +++ b/drivers/soc/qcom/smem.c @@ -815,13 +815,12 @@ static int qcom_smem_enumerate_partitions(struct qcom_smem *smem, host0 = le16_to_cpu(entry->host0); host1 = le16_to_cpu(entry->host1); - if (host0 != local_host && host1 != local_host) - continue; - if (host0 == local_host) remote_host = host1; - else + else if (host1 == local_host) remote_host = host0; + else + continue; if (remote_host >= SMEM_HOST_COUNT) { dev_err(smem->dev,