From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bmailout2.hostsharing.net (bmailout2.hostsharing.net [83.223.78.240]) (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 01F9F1917CD; Thu, 2 Jan 2025 10:38:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=83.223.78.240 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735814319; cv=none; b=RBcS3ELOPF4RA+SX2pNEwyzhX6LpzH5qZR017zX2UqjbyfwUnjPQwR10p/4kIZvnS5ZU96qKJTwuqhnTFODHiBwKF1i7T481HntNbbJ3G50nBGdqLlgC4vN22zff6x5VbrBfoquG+rEDkDbW6Yin2jSNoV4lsGC641AKd0MZqgM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735814319; c=relaxed/simple; bh=LpUnQDiio+JlMiPsNZKiGTW5Zem5ne95MKjZGD+pFi8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fp3vZwMPVoQ4BkGvCtjj+2eGLxtASkQsFFYcJ/aedJ4NBZs0iNR1YmzzuHgOF9XLggrn/jaE2GF7wbx/THDTEWKwmH0OluQ9oSKsgYR0yFDhk1415RcYqbGuN3wzn8otTj4c+Frz/OUJRmPmLxWG+h95+SQE54DRnSmqfDrQvhA= 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=83.223.78.240 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 [83.223.95.28]) (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 bmailout2.hostsharing.net (Postfix) with ESMTPS id DE5572800B4B7; Thu, 2 Jan 2025 11:38:27 +0100 (CET) Received: by h08.hostsharing.net (Postfix, from userid 100393) id C4A7B533CEB; Thu, 2 Jan 2025 11:38:27 +0100 (CET) Date: Thu, 2 Jan 2025 11:38:27 +0100 From: Lukas Wunner To: Ilpo =?iso-8859-1?Q?J=E4rvinen?= Cc: linux-pci@vger.kernel.org, Bjorn Helgaas , Lorenzo Pieralisi , Rob Herring , Krzysztof Wilczy??ski , "Maciej W . Rozycki" , Jonathan Cameron , Alexandru Gagniuc , Krishna chaitanya chundru , Srinivas Pandruvada , "Rafael J . Wysocki" , linux-pm@vger.kernel.org, Smita Koralahalli , linux-kernel@vger.kernel.org, Daniel Lezcano , Amit Kucheria , Zhang Rui , Christophe JAILLET Subject: Re: [PATCH v9 7/9] PCI/bwctrl: Add API to set PCIe Link Speed Message-ID: References: <20241018144755.7875-1-ilpo.jarvinen@linux.intel.com> <20241018144755.7875-8-ilpo.jarvinen@linux.intel.com> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20241018144755.7875-8-ilpo.jarvinen@linux.intel.com> On Fri, Oct 18, 2024 at 05:47:53PM +0300, Ilpo Järvinen wrote: > @@ -142,9 +304,11 @@ static int pcie_bwnotif_probe(struct pcie_device *srv) > if (ret) > return ret; > > - scoped_guard(rwsem_write, &pcie_bwctrl_lbms_rwsem) { > - port->link_bwctrl = no_free_ptr(data); > - pcie_bwnotif_enable(srv); > + scoped_guard(rwsem_write, &pcie_bwctrl_setspeed_rwsem) { > + scoped_guard(rwsem_write, &pcie_bwctrl_lbms_rwsem) { > + port->link_bwctrl = no_free_ptr(data); > + pcie_bwnotif_enable(srv); > + } > } The "data" pointer is allocated with devm_kzalloc(). There's no __free(kfree) anywhere. So what's the motivation for the no_free_ptr()? Is this a remnant of an earlier version of the patch set that can be deleted or is there actually a purpose to it? Thanks, Lukas