From patchwork Mon Sep 11 12:53:48 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: 13379282 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 CF1A7EE57DF 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: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:In-Reply-To:References: List-Owner; bh=sn9BKw0chWrP05e6EOYTLhF9gVk2mg9IeW/BAT7HbEA=; b=g7AYsoIR5eQc+1 tgKDzfOxw1hx9zN10O4zM2b0gUoG7UARLtVhPtNxP0zTIBeS6m7GDMnW686zfCIUl6B4NG8grnoks MiMIfgZxox00Hux3e+iI+mxY+tZFjYF1pNj9Ev1bdz3aJn5bRlE8nbXR3meWvo6Szmf2OTWEFUUqB LDgFFggpRcT+7KtE2cdtgPLFQNv0AfZqsBHA5zw2asmCmW9T+i/2vuRieZHCBK8RP6bDGXXaDo/Vh Dn3YF8BCZLbnU8aDwUxyEvoIs8XPl1PGUXqASnfWVUzEtnBYvd9EQIjxiB1wvDIjr1PC06wVwly4S vVUMhjvbdwqZw/Bq44ag==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qfgQp-000WXJ-2R; Mon, 11 Sep 2023 12:54:23 +0000 Received: from mgamail.intel.com ([192.55.52.136]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qfgQn-000WWH-0E for linux-arm-kernel@lists.infradead.org; Mon, 11 Sep 2023 12:54:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694436861; x=1725972861; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=/wVoKjEeeLBla+cD7axdVwdKaE7wsNtpVj0vYnNrywc=; b=CpRD31kR6Tr5gS6X2CvbjJCSrrnbx065qo6LOe9N6Ltf3rJ8pkRcHBqI Udwd6HO2gr1GbL7lDxjoimmWpksenFm0+feBdENjRgUF+ID/p5Jz+D810 GLAU5Zf009HpNodTBpBKt1XL6M22kQxoAUC9YSAlRaqZLfj0HgBCYlssK yt0XNb3civ/6Yi7bSSrcIT2sHl3dRc1uaQFqYSoKTvHMfOhiBF870nlcH aplGuA6BEBWNQ4BxslRQA1aUCBsro6J1lsJHevStIMmcML0it/087xb2y GeEVIGvvzz/df99ovunLLgfyY997fSp0A0sEyFyWstRrDi6MtkiOtj7yY w==; X-IronPort-AV: E=McAfee;i="6600,9927,10830"; a="357511148" X-IronPort-AV: E=Sophos;i="6.02,244,1688454000"; d="scan'208";a="357511148" 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:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10830"; a="858304123" X-IronPort-AV: E=Sophos;i="6.02,244,1688454000"; d="scan'208";a="858304123" 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:02 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: Rob Herring , Bjorn Helgaas , linux-pci@vger.kernel.org Cc: linux-kernel@vger.kernel.org, 3chas3@gmail.com, brking@us.ibm.com, dalias@libc.org, glaubitz@physik.fu-berlin.de, 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, linux-sh@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, ysato@users.sourceforge.jp, =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= Subject: [PATCH v3 0/6] PCI/treewide: Cleanup/streamline PCI error code handling Date: Mon, 11 Sep 2023 15:53:48 +0300 Message-Id: <20230911125354.25501-1-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230911_055421_160740_BCF91815 X-CRM114-Status: UNSURE ( 8.80 ) X-CRM114-Notice: Please train this message. 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 As the first step towards converting PCI accessor function return codes into normal errnos this series cleans up related code paths which have complicated multi-line construct to handle the PCI error checking. I'd prefer these (the remaining ones) to be routed through PCI tree due to PCI accessor function return code conversion being built on top of them. v3: - Return pci_generic_config_read32()'s error code directly - Removed already accepted patches v2: - Moved ret local var to the inner block (I2C: ali15x3) - Removed already accepted patches Ilpo Järvinen (6): alpha: Streamline convoluted PCI error handling sh: pci: Do PCI error check on own line atm: iphase: Do PCI error checks on own line PCI: Do error check on own line to split long if conditions PCI: xgene: Do PCI error check on own line & keep return value scsi: ipr: Do PCI error checks on own line arch/alpha/kernel/sys_miata.c | 17 +++++++++-------- arch/sh/drivers/pci/common.c | 7 ++++--- drivers/atm/iphase.c | 20 +++++++++++--------- drivers/pci/controller/pci-xgene.c | 7 ++++--- drivers/pci/pci.c | 9 ++++++--- drivers/pci/probe.c | 6 +++--- drivers/pci/quirks.c | 6 +++--- drivers/scsi/ipr.c | 12 ++++++++---- 8 files changed, 48 insertions(+), 36 deletions(-)