Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp981373ybh; Mon, 13 Jul 2020 06:27:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIuqR22c7u957kbGyAD4AyaJmUeYu2zU7kfDQgLAuKZ+JQc0epNSOlqYYkFbfa2T7945p2 X-Received: by 2002:a05:6402:1544:: with SMTP id p4mr92710489edx.334.1594646849422; Mon, 13 Jul 2020 06:27:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594646849; cv=none; d=google.com; s=arc-20160816; b=c0Bf7bA4LVO4aiHegQM/tX+n4mXJ3GY4At/7nS+aIAsccopg5XBJxGx3NF5tcIzjWD Q11pMAc+TKxeD+3q5QOeSdhyGb+QljRaxBT5KsHVg2W8nI1sKyQ1b14AjBOMQAX0aBB3 0X0uDQKQ4xv6bVjtMT67NUUQNOn2cc6aMh2Yb6MIOP9uzfpshzAxHkIjnXyXRyMJCcwf 4h0GxdaF7LF+4G7qBRlYyGPrKwru2Y77QVV4t2lbuymnj9bkRZcluS5hU6YwScRb2Kaj 7tQI2X9j1SFD60DJ7YMJ4ksr5tg87F1oEQhH6st3xTTLMbWiSUExgQTCSESMqt7RM5rj 1f+w== 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; bh=lE8AN0pbCu/dDP6jrScw+PxyAG3fiRl3vN639OZNf9c=; b=ohINvZiC2XM9jCgg/IsvLN2DxopLAhhiqLM/1E2gEYcPqpA9UQ7s8JhDkygqz5Zf/V /72kx2jFziIcNI02HyOa3CFajzQtjeUyrMIoKai5iTAeNXO8E3znl5s5eAxIBaVSdOy0 JFAruDFqOj/kohOfTTY/5i2JWqLq5Qcw63cjKNYZjVwKXrpqDR0T/owKxGvz3tdR9tIB 7riHmfiham4LWUXc5hZ6UxQ2ReagllrL6HRym101CzDTXb+QoFfNBtjFeZWsk0gD0uUr IN6cTY0vcOeD3ugE6jHjuJsaif4EWVemFdERyCf2oWVr60p016Sf5mPQ7K4fE5LBO8A9 STzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ayIR4bAO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m10si8725407eja.377.2020.07.13.06.27.06; Mon, 13 Jul 2020 06:27:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ayIR4bAO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730138AbgGMNYK (ORCPT + 99 others); Mon, 13 Jul 2020 09:24:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730011AbgGMNXP (ORCPT ); Mon, 13 Jul 2020 09:23:15 -0400 Received: from mail-ej1-x641.google.com (mail-ej1-x641.google.com [IPv6:2a00:1450:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC78FC061755; Mon, 13 Jul 2020 06:23:14 -0700 (PDT) Received: by mail-ej1-x641.google.com with SMTP id lx13so17143595ejb.4; Mon, 13 Jul 2020 06:23:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=lE8AN0pbCu/dDP6jrScw+PxyAG3fiRl3vN639OZNf9c=; b=ayIR4bAOLjTG4FPDTwj9Bv/rT1Mu5DSxUxmly1JRltd3/t49vc11ms35/6SaQTBnDW grgTbiRcbvJv/DP8VfCI2t5YIAma/O83HsL8bg6F3jmYn8DjHIHlFyBlPbwgK9NZvLpV NhVTBRZ7lKyJjY2HhB4nOgVrjuzjGx7Gbvx/0Ct/jc4ZoZkaXRHDGimKOxD6qy9dBCS+ sqcnADgH9diLoghHvHkKw+ljTOKr7vUjZGCiVth+JL4t+Oj2ZMh2VG+Nl97H8BDvhtip 06AOHg8fxgsVax5a7Dn03qBbGWuJCeSxlPhhmGspiYLN45bio5jqhu1ESiQs78Ezc6ow QJuw== 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=lE8AN0pbCu/dDP6jrScw+PxyAG3fiRl3vN639OZNf9c=; b=MxAQ13L0fuqCrtaO4VLvpk6UvuA3IjlqTjRnyzTucXKbeDd89FQK/ZApQrKmz6O/l1 c6SQXLuPlIUzvWoKm81RM2wtZK8+1ozCbgKtRba702qCqN/FYXI0lScOZkRMV1jOfbYi jjtRBbQ7C7vhhPhVf7Gt6Egrczp4DOnDFc0Q93WqneUoTIV8KK0TUxEdB9RlZnhq+1+v kseFibqktiFtvzeSMCZISWHssfhGbTXbU61kamSF1/+CAlobJasv9YHUR4xYThvH3V3v FO7ZVx248+EMXZP1cwLqsKYyB6kpE/h0Gikm7XV8+bnw+yJ6jSttIqGj1zGlkriuKbDC s1bA== X-Gm-Message-State: AOAM531iQHZbf24RQSugO5R3Nj08RJxvpTdIOaYxw0GjBbyy9uwx5T+v Kyps4cByktvBlJLMQ4H9qh0= X-Received: by 2002:a17:906:c24e:: with SMTP id bl14mr71978064ejb.285.1594646593479; Mon, 13 Jul 2020 06:23:13 -0700 (PDT) Received: from net.saheed (54007186.dsl.pool.telekom.hu. [84.0.113.134]) by smtp.gmail.com with ESMTPSA id n9sm11806540edr.46.2020.07.13.06.23.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2020 06:23:13 -0700 (PDT) From: "Saheed O. Bolarinwa" To: helgaas@kernel.org, Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras Cc: "Saheed O. Bolarinwa" , bjorn@helgaas.com, skhan@linuxfoundation.org, linux-pci@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [RFC PATCH 27/35] powerpc: Tidy Success/Failure checks Date: Mon, 13 Jul 2020 14:22:39 +0200 Message-Id: <20200713122247.10985-28-refactormyself@gmail.com> X-Mailer: git-send-email 2.18.2 In-Reply-To: <20200713122247.10985-1-refactormyself@gmail.com> References: <20200713122247.10985-1-refactormyself@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove unnecessary check for 0. Signed-off-by: "Saheed O. Bolarinwa" --- This patch depends on PATCH 26/35 arch/powerpc/platforms/powernv/eeh-powernv.c | 4 ++-- arch/powerpc/platforms/pseries/eeh_pseries.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/platforms/powernv/eeh-powernv.c b/arch/powerpc/platforms/powernv/eeh-powernv.c index 92f145dc9c1d..834cb6175cc4 100644 --- a/arch/powerpc/platforms/powernv/eeh-powernv.c +++ b/arch/powerpc/platforms/powernv/eeh-powernv.c @@ -318,7 +318,7 @@ static int pnv_eeh_find_ecap(struct pci_dn *pdn, int cap) if (!edev || !edev->pcie_cap) return 0; - if (pnv_pci_cfg_read(pdn, pos, 4, &header) != 0) + if (pnv_pci_cfg_read(pdn, pos, 4, &header)) return 0; else if (!header) return 0; @@ -331,7 +331,7 @@ static int pnv_eeh_find_ecap(struct pci_dn *pdn, int cap) if (pos < 256) break; - if (pnv_pci_cfg_read(pdn, pos, 4, &header) != 0) + if (pnv_pci_cfg_read(pdn, pos, 4, &header)) break; } diff --git a/arch/powerpc/platforms/pseries/eeh_pseries.c b/arch/powerpc/platforms/pseries/eeh_pseries.c index 9c023b928f2c..aec6f76879a9 100644 --- a/arch/powerpc/platforms/pseries/eeh_pseries.c +++ b/arch/powerpc/platforms/pseries/eeh_pseries.c @@ -200,7 +200,7 @@ static int pseries_eeh_find_ecap(struct pci_dn *pdn, int cap) if (!edev || !edev->pcie_cap) return 0; - if (rtas_read_config(pdn, pos, 4, &header) != 0) + if (rtas_read_config(pdn, pos, 4, &header)) return 0; else if (!header) return 0; @@ -213,7 +213,7 @@ static int pseries_eeh_find_ecap(struct pci_dn *pdn, int cap) if (pos < 256) break; - if (rtas_read_config(pdn, pos, 4, &header) != 0) + if (rtas_read_config(pdn, pos, 4, &header)) break; } -- 2.18.2