Re: [PATCH 5/5] switchtec: MRPC DMA mode implementation

Logan Gunthorpe
2018-12-13T16:46:21Z

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