Re: [PATCH v9 7/9] PCI/bwctrl: Add API to set PCIe Link Speed

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

 



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




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux