From patchwork Mon Sep 11 12:53:50 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: 13379281 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 C648EEE7FF4 for ; Mon, 11 Sep 2023 12:54:50 +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=9M6zr4cs7Uh/qctOXDcTCbsfRZoQFsK2YBKwuNHh7Fo=; b=GWO+LgkUS2Wph5 95ELxD1bbvYw46Cz3V+W9K8Z7nwBk15qk56SWzm29ZxyGD5UwXvsbM55YgWl7hcdJX37ZE+tDrUQ0 N0qC2r0MnDjZNUqoWZbSNz8IQfiGmYLlCd6Nj2Ygx9mWhuQAwy5EB3hl8UcHL+lwLXEVw2KgbzT+y EvXyYhYIqxgtAc3YQkGXKgJoIDb4kBRMR6cCNN3S1nxKDipegIH7J9JQpsyX/ZVZXscmpWckDq4oE U9r6N7B6wwTNwyS7XxjL9iRsJTK5TsBG7nsy9Pv+s3At7Js7U+oJ6mFY/qtpImg9S1y1lmMWHKfUa 26D9SLMkq9g9+Mmla6IA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qfgQs-000WY6-2k; Mon, 11 Sep 2023 12:54:26 +0000 Received: from mgamail.intel.com ([192.55.52.136]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qfgQo-000WWH-2b for linux-arm-kernel@lists.infradead.org; Mon, 11 Sep 2023 12:54:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694436862; x=1725972862; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=tnx7Bflw7Y/aVGaG8EH0QBwqdgCKqxJb3mqsR3QL2Es=; b=oKQX6ZckJQAID/6vF4w0ycp1TCo97TgSgwcD+TK271Th7kTsIo/BSKML ZcU/eloHzrBP/tZ7G5XigeoO3bKftrXrH1obUUAmVN/YYFjB8ox7LD4jz yOmCMjpQcEVqRZ7p3FH5xcNn7H46+ywQ9tCVVg24hudfd1WaQFoDwnpJY 66EgXWs1vCpk6WPI1f2SZI6gpnoCQgItvLGqONQ0sQbBgJ4+4xfahRfpn mrf1Os7oBQK4mfBGFzxdV5xw+w9l0txHQF2JzGKC5sJA+OiYBmG9HLTqh 8FfZ0jyHMeFGcghp2BYxcMgvBaxU8QKchS5Lj9ViCQJMk2fTXVqSRRF/S w==; X-IronPort-AV: E=McAfee;i="6600,9927,10830"; a="357511210" X-IronPort-AV: E=Sophos;i="6.02,244,1688454000"; d="scan'208";a="357511210" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Sep 2023 05:54:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10830"; a="858304223" X-IronPort-AV: E=Sophos;i="6.02,244,1688454000"; d="scan'208";a="858304223" Received: from mzarkov-mobl3.ger.corp.intel.com (HELO ijarvine-mobl2.ger.corp.intel.com) ([10.252.36.200]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Sep 2023 05:54:16 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: Rob Herring , Bjorn Helgaas , linux-pci@vger.kernel.org, Yoshinori Sato , Rich Felker , John Paul Adrian Glaubitz , linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org Cc: 3chas3@gmail.com, brking@us.ibm.com, ink@jurassic.park.msu.ru, jejb@linux.ibm.com, kw@linux.com, linux-alpha@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-atm-general@lists.sourceforge.net, linux-scsi@vger.kernel.org, lpieralisi@kernel.org, martin.petersen@oracle.com, mattst88@gmail.com, netdev@vger.kernel.org, richard.henderson@linaro.org, toan@os.amperecomputing.com, =?utf-8?q?Ilpo_J=C3=A4rvinen?= Subject: [PATCH v3 2/6] sh: pci: Do PCI error check on own line Date: Mon, 11 Sep 2023 15:53:50 +0300 Message-Id: <20230911125354.25501-3-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230911125354.25501-1-ilpo.jarvinen@linux.intel.com> References: <20230911125354.25501-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-20230911_055422_929268_3841CDA0 X-CRM114-Status: GOOD ( 11.44 ) 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 Acked-by: John Paul Adrian Glaubitz --- arch/sh/drivers/pci/common.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/sh/drivers/pci/common.c b/arch/sh/drivers/pci/common.c index 2fd2b77e12ce..f59e5b9a6a80 100644 --- a/arch/sh/drivers/pci/common.c +++ b/arch/sh/drivers/pci/common.c @@ -53,15 +53,16 @@ int __init pci_is_66mhz_capable(struct pci_channel *hose, unsigned short vid; int cap66 = -1; u16 stat; + int ret; pr_info("PCI: Checking 66MHz capabilities...\n"); for (pci_devfn = 0; pci_devfn < 0xff; pci_devfn++) { if (PCI_FUNC(pci_devfn)) continue; - if (early_read_config_word(hose, top_bus, current_bus, - pci_devfn, PCI_VENDOR_ID, &vid) != - PCIBIOS_SUCCESSFUL) + ret = early_read_config_word(hose, top_bus, current_bus, + pci_devfn, PCI_VENDOR_ID, &vid); + if (ret != PCIBIOS_SUCCESSFUL) continue; if (vid == 0xffff) continue;