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

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

 




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



[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