Re: [PATCH 05/16] PCI: PCIe portdrv: Add interface for getting CXL isolation IRQ

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

 



Thanks for taking a look Lukas! Responses inline.

On 7/31/2025 12:59 AM, Lukas Wunner wrote:
> On Wed, Jul 30, 2025 at 04:47:07PM -0500, Ben Cheatham wrote:
>> Add a function to the CXL isolation service driver that allows the CXL
>> core to get the necessary information for setting up an interrupt
>> handler.
> [...]
>>  static int cxl_isolation_probe(struct pcie_device *dev)
>>  {
>> -	if (!pcie_is_cxl(dev->port) || pcie_cxliso_get_intr_vec(dev->port, NULL))
>> +	struct cxl_isolation_info *info;
>> +	if (!pcie_is_cxl(dev->port) ||
>> +	    pcie_cxliso_get_intr_vec(dev->port, NULL))
>>  		return -ENXIO;
> 
> The re-wrapping of the if-condition shouldn't be here, it should be
> wrapped the way you want it in the patch *introducing* the if-condition.
> 

You're right, don't know why I did that :/.

>> +	info = devm_kzalloc(&dev->device, sizeof(*info), GFP_KERNEL);
>> +	if (!info)
>> +		return -ENOMEM;
>> +
>> +	*info = (struct cxl_isolation_info) {
>> +		.dev = &dev->device,
>> +		.irq = dev->irq,
>> +	};
>> +
>> +	set_service_data(dev, info);
> 
> No, the irq is already saved in struct pcie_device, there's no need
> to duplicate that.
> 

Good point, will do. I think I originally had the mapping of the CXL isolation
register in the struct cxl_isolation_info, but it makes no sense to keep this
around anymore.

Thanks,
Ben




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux