Re: [PATCH net-next v13 04/13] net: pse-pd: Add support for PSE power domains

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le Sat, 14 Jun 2025 12:13:29 -0700,
Jakub Kicinski <kuba@xxxxxxxxxx> a écrit :

> 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 = 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 = 0; i < pcdev->nr_lines; i++) {
> > +		if (!pcdev->pi[i].pw_d)
> > +			continue;
> > +
> > +		pw_d = 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);
> > +	}
> > +}  
> 
> AFAIU the release function (__pse_pw_d_release) is supposed to release
> the mutex. 

Yes indeed thanks!

-- 
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com





[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux