Re: [PATCH 5/5] switchtec: MRPC DMA mode implementation
From: Logan Gunthorpe
Date: Thu Dec 13 2018 - 11:46:21 EST
On 2018-12-13 8:17 a.m., Bjorn Helgaas wrote:
>> static void init_pff(struct switchtec_dev *stdev)
>> @@ -1294,6 +1367,19 @@ static int switchtec_init_pci(struct switchtec_dev *stdev,
>>
>> pci_set_drvdata(pdev, stdev);
>>
>> + if (!use_dma_mrpc)
>> + return 0;
>> +
>> + if (!(ioread32(&stdev->mmio_mrpc->dma_ver) ? true : false))
>> + return 0;
>
> This is ... harder to decode than necessary. It's obvious that the
> intent is to return if the adapter firmware doesn't support DMA, but I
> lost interest before I could verify that it works as intended.
Oh, ick, yes. I must have missed that in my review.
@Wesley, that would definitely be something worth cleaning up. That
ternary operator doesn't make any sense.
Thanks, Bjorn, for the review and picking up the series.
Logan