Re: [PATCH v3 07/11] dmaengine: switchtec-dma: disable channels before freeing on registration failure
From: Logan Gunthorpe
Date: Mon Jul 27 2026 - 17:55:56 EST
On 2026-07-27 15:21, Frank Li wrote:
> On Mon, Jul 27, 2026 at 12:15:22PM -0600, Logan Gunthorpe wrote:
>> +static void switchtec_dma_chans_disable(struct pci_dev *pdev,
>> + struct switchtec_dma_dev *swdma_dev)
>> +{
>> + int i;
>> +
>> + if (swdma_dev->chan_status_irq >= 0) {
>> + pci_free_irq(pdev, swdma_dev->chan_status_irq, swdma_dev);
>> + swdma_dev->chan_status_irq = -1;
>> + }
>> +
>> + for (i = 0; i < swdma_dev->chan_cnt; i++)
>> + list_del(&swdma_dev->swdma_chans[i]->dma_chan.device_node);
>> +}
>> +
>
> Maybe historic reason, it is not good to touch dma_chan::device_node.
> Suppose some hepler function to manage channels.
>
> Reviewed-by: Frank Li <Frank.Li@xxxxxxx>
Ok, thanks. When I have some free time I'll see if I can clean that up,
but not for this series.
Logan