From patchwork Sun Aug 27 13:37:00 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: 13367274 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E3E26C83F18 for ; Sun, 27 Aug 2023 13:38:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231171AbjH0Nh5 (ORCPT ); Sun, 27 Aug 2023 09:37:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231178AbjH0Nhe (ORCPT ); Sun, 27 Aug 2023 09:37:34 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CEEEBF; Sun, 27 Aug 2023 06:37:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1693143452; x=1724679452; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=tnx7Bflw7Y/aVGaG8EH0QBwqdgCKqxJb3mqsR3QL2Es=; b=UwmpY7wJMrGnknhcUFiJBm8SVMv6W83CUB3e6L0s8YXoB+5MGgZBZ5B7 oPVX0tsrP1AmUvoVo0mDNhDUKa8JP79AHXwv0+YCKwfzTE8dCIHr+KUua UISiDkcnvZ2a+uwxrv6mOri2yvdmjs2JeLu9NV9FKWFFhYYwUQvkhBd02 f4I0w66q8ZL0TvhfAWPyGeFoxryhn9NTpfzRzX04NgZCa+x/V50TMmGgb voNtzUXJHn6a9b+XBlLidw70LMg2XI8I5sHpaUIwveloE1+B74uEe0L5E CcRj9Z6bHCm22Qia1182g9rIeLzz9XD9a0SlyvlZUM2VVperR9S1MNoQq A==; X-IronPort-AV: E=McAfee;i="6600,9927,10815"; a="354471005" X-IronPort-AV: E=Sophos;i="6.02,205,1688454000"; d="scan'208";a="354471005" 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:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10815"; a="1068752128" X-IronPort-AV: E=Sophos;i="6.02,205,1688454000"; d="scan'208";a="1068752128" 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:28 -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?= , Yoshinori Sato , Rich Felker , John Paul Adrian Glaubitz , linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org Cc: =?utf-8?q?Ilpo_J=C3=A4rvinen?= Subject: [PATCH v2 3/8] sh: pci: Do PCI error check on own line Date: Sun, 27 Aug 2023 16:37:00 +0300 Message-Id: <20230827133705.12991-4-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 Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.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;