From nobody Fri Dec 19 15:59:35 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 52ED3221D9E; Mon, 19 May 2025 21:37:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747690620; cv=none; b=Ue2WLykSp45dZe2iK8AMFKanylaMPZnySZFT+HuiHN2NzgWH9J5vo4PWUhPpXP45Zazf7RgCHVByQWiITBKPmz1tt9XrR9gHbRuh3FfETWuxAoQZso0DDrReVY0nqrNJ39M13nmuTAMNhUZtENtewhBVL5xFp+rRqwmBJnAvWQc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747690620; c=relaxed/simple; bh=TvyG8I4ePW9JSyZ32FkDAV75N1u5mKKeii8+CFDAmM8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Opp5hc0bfhTfXcdkSq05k6hGZfBuL/bXjCL3Y9XPypbdHp6GUcqO+2fYdpuI/XmB5bYYf3rycg6RortdCXSHHwHP2u5z94AZUsUZISq1ccseV9TCm3pmyaoQ8z+24u0UPLFiw0yCsk9UOZubMNYze/7uYT1LBtpAf0gvGj9thXk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BRYz141r; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BRYz141r" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F22E1C4CEE9; Mon, 19 May 2025 21:36:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1747690620; bh=TvyG8I4ePW9JSyZ32FkDAV75N1u5mKKeii8+CFDAmM8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BRYz141rcAmN3WnJ1iiASwcwkipbTGnqlUFiu0+OteHSQtfwWqorpAy9NdMdyxMu+ zM/I+hwR/vSjp1/t0mPFWecVrukY4qFmwHLFVImobHKKpogPT0eOlSvHno5FNtteJi sNdmlIHpk5BDl+BtaLXTolIsyFbyT8ErsEvonrQglO7FQ1JTZ9cx8WImHvro0R93e6 v7JnAy+n7R6El4ZzGydO1Gh+OAAtkRBlPzyoqshRRNs16AgpRZjea/kVyvwq8ZSssQ Dy+Y3Jk0Rf6lp3Q2QWsf4fEPoo5sxMpteiyLAIQE0JqTpWnkuv0929L2+mZIO4SlSm saTJunZO1nb/w== From: Bjorn Helgaas To: linux-pci@vger.kernel.org Cc: Jon Pan-Doh , Karolina Stolarek , Martin Petersen , Ben Fuller , Drew Walton , Anil Agrawal , Tony Luck , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , Sathyanarayanan Kuppuswamy , Lukas Wunner , Jonathan Cameron , Sargun Dhillon , "Paul E . McKenney" , Mahesh J Salgaonkar , Oliver O'Halloran , Kai-Heng Feng , Keith Busch , Robert Richter , Terry Bowman , Shiju Jose , Dave Jiang , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Bjorn Helgaas Subject: [PATCH v6 06/16] PCI/AER: Move aer_print_source() earlier in file Date: Mon, 19 May 2025 16:35:48 -0500 Message-ID: <20250519213603.1257897-7-helgaas@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250519213603.1257897-1-helgaas@kernel.org> References: <20250519213603.1257897-1-helgaas@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Bjorn Helgaas Move aer_print_source() earlier in the file so a future change can use it from aer_print_error(), where it's easier to rate limit it. Signed-off-by: Bjorn Helgaas Reviewed-by: Ilpo J=C3=A4rvinen Reviewed-by: Kuppuswamy Sathyanarayanan --- drivers/pci/pcie/aer.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c index eb42d50b2def..95a4cab1d517 100644 --- a/drivers/pci/pcie/aer.c +++ b/drivers/pci/pcie/aer.c @@ -696,6 +696,18 @@ static void __aer_print_error(struct pci_dev *dev, pci_dev_aer_stats_incr(dev, info); } =20 +static void aer_print_source(struct pci_dev *dev, struct aer_err_info *inf= o, + const char *details) +{ + u16 source =3D info->id; + + pci_info(dev, "%s%s error message received from %04x:%02x:%02x.%d%s\n", + info->multi_error_valid ? "Multiple " : "", + aer_error_severity_string[info->severity], + pci_domain_nr(dev->bus), PCI_BUS_NUM(source), + PCI_SLOT(source), PCI_FUNC(source), details); +} + void aer_print_error(struct pci_dev *dev, struct aer_err_info *info) { int layer, agent; @@ -733,18 +745,6 @@ void aer_print_error(struct pci_dev *dev, struct aer_e= rr_info *info) info->severity, info->tlp_header_valid, &info->tlp); } =20 -static void aer_print_source(struct pci_dev *dev, struct aer_err_info *inf= o, - const char *details) -{ - u16 source =3D info->id; - - pci_info(dev, "%s%s error message received from %04x:%02x:%02x.%d%s\n", - info->multi_error_valid ? "Multiple " : "", - aer_error_severity_string[info->severity], - pci_domain_nr(dev->bus), PCI_BUS_NUM(source), - PCI_SLOT(source), PCI_FUNC(source), details); -} - #ifdef CONFIG_ACPI_APEI_PCIEAER int cper_severity_to_aer(int cper_severity) { --=20 2.43.0