From patchwork Sun Aug 27 13:37:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ilpo_J=C3=A4rvinen?= X-Patchwork-Id: 13367278 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C9B96C83F11 for ; Sun, 27 Aug 2023 13:38:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gbTUfvOeJTgsgKw65Ux9A2fShRJdsQ1PzsDRmSi/oDI=; b=FUb+pvd7d4tBO/ /2DmwGMT6+c6ve9l5gkhIN+jSM7IVo5HOMwpDbAjOooeQRkNnSRhGuDwZlmGf08C9AtHUN10pDNI2 QpRaxxjAz0kRts/qOe1TTb7kqSoROxa/SSQ05vLNnrSdkMcE/zRlagAjHtKJW7QuH8xm+JY5lSIR7 Pzl23rvvo5zqO8w7BdP9xzbQKFO4mPtz68sOZqNt9MxrXM1rdc9yIwivueAAfgj3WoI2g4hTEIhoQ Px8+Mvn31eDGuZAOsAAivxCm3x1eF8Cmg5RPWl2O/Ig+STgnVNDRSULcyk0GTlTOa4UvpIBBlzhT5 c3KhTpHWcPw9fSn1NJGA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qaFxl-00877u-28; Sun, 27 Aug 2023 13:37:57 +0000 Received: from mgamail.intel.com ([192.55.52.136]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qaFxj-00875i-0A for linux-arm-kernel@lists.infradead.org; Sun, 27 Aug 2023 13:37:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1693143475; x=1724679475; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=XsgnyeH+vKrvqCa5oSfNV41+itOz4CsaFKKgFslGD+E=; b=Wog5/4hzQ7apPJLjkMdul+p9sLHo/8j/UK7fe50LRAC9JeIrxz8d+teM wH7Zqa7aG0df1AKeobz5LB2UZ76o6/HcBtfn6fU7iUpXSiR2jcdH5OXfy YHzH28nqzQQwvTmKP9IkcOYRC08l+TcHQE1OUswZC7nzW+tpt2c5k6pkz p/Arx+cD+6Xehq46n7DqAZeKNIzAdBFDZ8wDJ5JZlj013SwFAhHYWHJG2 B/P6b6JJ+z8OD4OlWjzsV8x/tkNYIq7M6gdagerhvMEYx4hyzkYshu/Ji 1ZnS6xna7+poKnys/Z0U6uO/lpnVaCbzSWBDkXEy4umv76i+7WZbSuxSu g==; X-IronPort-AV: E=McAfee;i="6600,9927,10815"; a="354471051" X-IronPort-AV: E=Sophos;i="6.02,205,1688454000"; d="scan'208";a="354471051" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Aug 2023 06:37:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10815"; a="1068752191" X-IronPort-AV: E=Sophos;i="6.02,205,1688454000"; d="scan'208";a="1068752191" Received: from dplotkin-mobl.ger.corp.intel.com (HELO ijarvine-mobl2.ger.corp.intel.com) ([10.249.41.231]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Aug 2023 06:37:48 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-pci@vger.kernel.org, Bjorn Helgaas , Andi Shyti , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Toan Le , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= , Rob Herring , Bjorn Helgaas , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: =?utf-8?q?Ilpo_J=C3=A4rvinen?= Subject: [PATCH v2 7/8] PCI: xgene: Do PCI error check on own line Date: Sun, 27 Aug 2023 16:37:04 +0300 Message-Id: <20230827133705.12991-8-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230827133705.12991-1-ilpo.jarvinen@linux.intel.com> References: <20230827133705.12991-1-ilpo.jarvinen@linux.intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230827_063755_107951_8B4ADB36 X-CRM114-Status: GOOD ( 11.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Instead of a if condition with a line split, use the usual error handling pattern with a separate variable to improve readability. No functional changes intended. Signed-off-by: Ilpo Järvinen --- drivers/pci/controller/pci-xgene.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/pci/controller/pci-xgene.c b/drivers/pci/controller/pci-xgene.c index 887b4941ff32..b7f338de160b 100644 --- a/drivers/pci/controller/pci-xgene.c +++ b/drivers/pci/controller/pci-xgene.c @@ -163,9 +163,10 @@ static int xgene_pcie_config_read32(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val) { struct xgene_pcie *port = pcie_bus_to_port(bus); + int ret; - if (pci_generic_config_read32(bus, devfn, where & ~0x3, 4, val) != - PCIBIOS_SUCCESSFUL) + ret = pci_generic_config_read32(bus, devfn, where & ~0x3, 4, val); + if (ret != PCIBIOS_SUCCESSFUL) return PCIBIOS_DEVICE_NOT_FOUND; /*