From patchwork Thu Aug 24 13:28:29 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: 13364188 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 1322EC27C40 for ; Thu, 24 Aug 2023 13:42:22 +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=jPYtxI9CPPyC24 AxMUk3BYTmCBbCTA2L7WtCg+pRlv8CscdvN1C3t+2QVcFx5mujEYoLM2CARX6FZHL/BH4yXDD6Wmb DPIK9wmyPkcC30lncEe7CepKKmjUMxAHFLP6ddoj8sk5ZI5NlVExpWljFJnTF3z2PSo/+ZTTpw0k7 pyJzQvcFETtukuT26vjOzdU5wq0uT74upoR7x3RR8gGTki2cxhoUERGTPq4PTST6/Z6vjYSKL9LTW 1T+i/ykS7pjEv1aPzSWidKypgomFKogiygiwDoNC3pqhNbt4FJ0rJKQeJo90T/U9Vfyp8hSoDmh60 VIVClKIk6vkDEx6NHsJA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qZAaw-003Ak6-0W; Thu, 24 Aug 2023 13:41:54 +0000 Received: from mgamail.intel.com ([134.134.136.100]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qZAat-003AjK-2D for linux-arm-kernel@lists.infradead.org; Thu, 24 Aug 2023 13:41:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1692884511; x=1724420511; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=XsgnyeH+vKrvqCa5oSfNV41+itOz4CsaFKKgFslGD+E=; b=Meqvzrr5MX/uzrNVp8UpMuMop1zGaxpGuUQkdBzrjJG/L6XalAGXZCof PLQ6KWKaH2Fq+59oJmXgQp54dcWAMMTmJifuW5uEdB2sjPD7Tzq59tU11 ytunmmQxavnxlB14ON3u+r9C3/cMtKSzEmPWxyjJHK3XEacyDlw7k5aeI MNlScGGFAXoZpP4rz1yH2afLuvaeoWahGgEi/GMgsuk6r72Bv4dcG6Apg P36PAL6DZJOd/Nsb0nJnyqdyZwtAEYcN3zPqLVbsSWF7e4yVIq4aTkOQD HIyAGytD+0/e/Q+vq+5c5SIGnXNVuFhl7RKICF4nsajDBILAXjiv+nGr5 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10812"; a="440792514" X-IronPort-AV: E=Sophos;i="6.02,195,1688454000"; d="scan'208";a="440792514" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Aug 2023 06:29:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10812"; a="802539972" X-IronPort-AV: E=Sophos;i="6.02,195,1688454000"; d="scan'208";a="802539972" Received: from abedekar-mobl1.ger.corp.intel.com (HELO ijarvine-mobl2.ger.corp.intel.com) ([10.251.213.29]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Aug 2023 06:29:20 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-pci@vger.kernel.org, Bjorn Helgaas , 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 11/14] PCI: xgene: Do PCI error check on own line Date: Thu, 24 Aug 2023 16:28:29 +0300 Message-Id: <20230824132832.78705-12-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230824132832.78705-1-ilpo.jarvinen@linux.intel.com> References: <20230824132832.78705-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-20230824_064151_824566_701C81FB X-CRM114-Status: GOOD ( 11.91 ) 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; /*