From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bmailout3.hostsharing.net (bmailout3.hostsharing.net [176.9.242.62]) (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 1FE3F145B16; Thu, 28 Aug 2025 12:33:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=176.9.242.62 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756384386; cv=none; b=KdLaT6cLC9/0JyQrPU2IVGMiTjXeCsNj6jBWhV7cdIxW0ihe4OElPePrXNppDoc2C06iNQhFE3TNtMcIbH7QaOnR7EIqONBcHK/M2VumzY3NdrlO3GjA1Md/AbDL3d29d2sjJmanwHgsmdG4NxwR8l+VENBWGME641AcPQ+UfBo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756384386; c=relaxed/simple; bh=4+KJ+Kkm+a9h5spaJ5UWIVT2oZP76H7I8YbeBR+5ZUU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=umjDUl3/izrSO3DI1zk0Xxq2Ewf6TLvCov5BDgZXL9TZR4/0HUbmCKcFk/dxmM9dwON4b64O98K2ubx8fORvITS3DjVOLNh2yszyj3cHvKqu2Ndnqvjh0kUfPm6x6b+NpbkXm/4+nXtsbqzN0QRvw5xQ7TA2yIUWoJRUS1INyU0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wunner.de; spf=none smtp.mailfrom=h08.hostsharing.net; arc=none smtp.client-ip=176.9.242.62 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wunner.de Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=h08.hostsharing.net Received: from h08.hostsharing.net (h08.hostsharing.net [IPv6:2a01:37:1000::53df:5f1c:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "*.hostsharing.net", Issuer "RapidSSL TLS RSA CA G1" (verified OK)) by bmailout3.hostsharing.net (Postfix) with ESMTPS id 23AC82C051CD; Thu, 28 Aug 2025 14:32:54 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id F2EB14E6B25; Thu, 28 Aug 2025 14:32:53 +0200 (CEST) Date: Thu, 28 Aug 2025 14:32:53 +0200 From: Lukas Wunner To: Krishna Chaitanya Chundru Cc: Bjorn Helgaas , Lorenzo Pieralisi , Rob Herring , Krzysztof Kozlowski , Conor Dooley , chaitanya chundru , Bjorn Andersson , Konrad Dybcio , cros-qcom-dts-watchers@chromium.org, Jingoo Han , Bartosz Golaszewski , Krzysztof Wilczy??ski , Manivannan Sadhasivam , Catalin Marinas , Will Deacon , quic_vbadigan@quicnic.com, amitk@kernel.org, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, jorge.ramirez@oss.qualcomm.com, linux-arm-kernel@lists.infradead.org, Dmitry Baryshkov , Shawn Anastasio , Timothy Pearson Subject: Re: [PATCH v6 7/9] PCI: Add pcie_link_is_active() to determine if the link is active Message-ID: References: <20250828-qps615_v4_1-v6-0-985f90a7dd03@oss.qualcomm.com> <20250828-qps615_v4_1-v6-7-985f90a7dd03@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250828-qps615_v4_1-v6-7-985f90a7dd03@oss.qualcomm.com> On Thu, Aug 28, 2025 at 05:39:04PM +0530, Krishna Chaitanya Chundru wrote: > Add pcie_link_is_active() a common API to check if the PCIe link is active, > replacing duplicate code in multiple locations. > > Signed-off-by: Krishna Chaitanya Chundru > Signed-off-by: Shawn Anastasio > Signed-off-by: Timothy Pearson I think the submitter of the patch (who will become the git commit author) needs to come last in the Signed-off-by chain. > +++ b/drivers/pci/hotplug/pciehp_hpc.c > @@ -614,8 +587,8 @@ static void pciehp_ignore_link_change(struct controller *ctrl, > * Synthesize it to ensure that it is acted on. > */ > down_read_nested(&ctrl->reset_lock, ctrl->depth); > - if (!pciehp_check_link_active(ctrl) || pciehp_device_replaced(ctrl)) > - pciehp_request(ctrl, ignored_events); > + if (!pcie_link_is_active(ctrl_dev(ctrl)) || pciehp_device_replaced(ctrl)) > + pciehp_request(ctrl, PCI_EXP_SLTSTA_DLLSC); > up_read(&ctrl->reset_lock); > } You can just use "pdev" instead of "ctrl_dev(ctrl)" as argument to pcie_link_is_active() to shorten the line. With that addressed, Reviewed-by: Lukas Wunner