From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) (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 33071285C88; Mon, 16 Jun 2025 12:37:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.196 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750077433; cv=none; b=CAsNOKNqikIpwkgMyqhHbZOmwuCIjiFIDxHFpIq/q9MEcamze5aTiWKLw02z1WKA/h6Ott/lZN8kf7MsKmCoJSeY0AQSoFwh2wDV6++bfwMJJ7ni4M3XtAxhmitkx1MSS7VvCBo6I/a79eTuLkrCML9hDfwjWghoICuOycpx+a4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750077433; c=relaxed/simple; bh=ZeP7tjC/ZhNCZ3i6ehT8hX7C0+VGcUECL26rGy8Kgm4=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=umXIfXGaSPPLlZBRP2G4yBw2YMrwxpWD1y93KzXvajW5vIdNXVm29PbOxeOQ0jIEqUrmqyPfm4TYk5HQxTyuqAe51QNnTIkXNYjWHDy1hi01dqFI/bJ3ppi+Kfg8ZO/nao08DcN8CkNCxnjQElJpmCm335pmEt+rdxo/tD2l8jU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=mQZcCmKq; arc=none smtp.client-ip=217.70.183.196 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="mQZcCmKq" Received: by mail.gandi.net (Postfix) with ESMTPSA id 6114F443D2; Mon, 16 Jun 2025 12:37:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1750077423; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kG3QipumXVsgRC4HVgkiBiGQuTdDWQuhKnssOVQC3/Y=; b=mQZcCmKq8vupYDAfa3gPiIL9kiqYFRpFCvdRUHZ/B+32xQJa/gwrTMGv8oSnkwr3k86MPC XkGEapMDGYuj+hMt2t4YusO7Xx2llW+Ct3eHDvGylDNPjT5kcTLk42bM+lbfY70arP8Z92 l1jxM1yfdrYqvEW9p8hfXVNCpvK26hG3dA1gREmUae9II6ug2VAhykDTB0toYrXcoGhWcr Tm86JSNlKIprxGN2pWxxCypMxRvmkrLYucTfzaT1fm1ilBjWun7XsI2IGhaCyRdRB4MEeY j+06koYoplIyAQNXGOAuj/WXq9UC6V3EYaQNstnlWsiRb5pSoe6zGNRnRHaVzw== Date: Mon, 16 Jun 2025 14:37:00 +0200 From: Kory Maincent To: Jakub Kicinski Cc: Andrew Lunn , Oleksij Rempel , "David S. Miller" , Eric Dumazet , Paolo Abeni , Jonathan Corbet , Donald Hunter , Rob Herring , Andrew Lunn , Simon Horman , Heiner Kallweit , Russell King , Krzysztof Kozlowski , Conor Dooley , Liam Girdwood , Mark Brown , Thomas Petazzoni , netdev@vger.kernel.org, linux-doc@vger.kernel.org, Kyle Swenson , Dent Project , kernel@pengutronix.de, Maxime Chevallier , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v13 04/13] net: pse-pd: Add support for PSE power domains Message-ID: <20250616143700.6740fa59@kmaincent-XPS-13-7390> In-Reply-To: <20250614121329.7720ff33@kernel.org> References: <20250610-feature_poe_port_prio-v13-0-c5edc16b9ee2@bootlin.com> <20250610-feature_poe_port_prio-v13-4-c5edc16b9ee2@bootlin.com> <20250614121329.7720ff33@kernel.org> Organization: bootlin X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddugddvieeitdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepfffhvfevuffkjghfohfogggtgfesthhqredtredtjeenucfhrhhomhepmfhorhihucforghinhgtvghnthcuoehkohhrhidrmhgrihhntggvnhhtsegsohhothhlihhnrdgtohhmqeenucggtffrrghtthgvrhhnpefguddtfeevtddugeevgfevtdfgvdfhtdeuleetffefffffhffgteekvdefudeiieenucffohhmrghinhepsghoohhtlhhinhdrtghomhenucfkphepledtrdekledrudeifedruddvjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeeltddrkeelrdduieefrdduvdejpdhhvghlohepkhhmrghinhgtvghnthdqigfrufdqudefqdejfeeltddpmhgrihhlfhhrohhmpehkohhrhidrmhgrihhntggvnhhtsegsohhothhlihhnrdgtohhmpdhnsggprhgtphhtthhopedvjedprhgtphhtthhopehkuhgsrgeskhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprghnughrvgifsehluhhnnhdrtghhpdhrtghpthhtohepohdrrhgvmhhpvghlsehpvghnghhuthhrohhnihigrdguvgdprhgtphhtthhopegurghvvghmsegurghvvghmlhhofhhtrdhnvghtpdhrtghpthhtohepvgguuhhmrgiiv ghtsehgohhoghhlvgdrtghomhdprhgtphhtthhopehprggsvghnihesrhgvughhrghtrdgtohhmpdhrtghpthhtoheptghorhgsvghtsehlfihnrdhnvghtpdhrtghpthhtohepughonhgrlhgurdhhuhhnthgvrhesghhmrghilhdrtghomh X-GND-Sasl: kory.maincent@bootlin.com Le Sat, 14 Jun 2025 12:13:29 -0700, Jakub Kicinski a =C3=A9crit : > On Tue, 10 Jun 2025 10:11:38 +0200 Kory Maincent wrote: > > +static void __pse_pw_d_release(struct kref *kref) > > +{ > > + struct pse_power_domain *pw_d =3D container_of(kref, > > + struct > > pse_power_domain, > > + refcnt); > > + > > + regulator_put(pw_d->supply); > > + xa_erase(&pse_pw_d_map, pw_d->id); > > +} > > + > > +/** > > + * pse_flush_pw_ds - flush all PSE power domains of a PSE > > + * @pcdev: a pointer to the initialized PSE controller device > > + */ > > +static void pse_flush_pw_ds(struct pse_controller_dev *pcdev) > > +{ > > + struct pse_power_domain *pw_d; > > + int i; > > + > > + for (i =3D 0; i < pcdev->nr_lines; i++) { > > + if (!pcdev->pi[i].pw_d) > > + continue; > > + > > + pw_d =3D xa_load(&pse_pw_d_map, pcdev->pi[i].pw_d->id); > > + if (!pw_d) > > + continue; > > + > > + kref_put_mutex(&pw_d->refcnt, __pse_pw_d_release, > > + &pse_pw_d_mutex); > > + } > > +} =20 >=20 > AFAIU the release function (__pse_pw_d_release) is supposed to release > the mutex.=20 Yes indeed thanks! --=20 K=C3=B6ry Maincent, Bootlin Embedded Linux and kernel engineering https://bootlin.com