Re: [PATCH v2 1/1] misc: pci_endpoint_test: Refactor dma_set_mask_and_coherent() logic

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

 



On Thu, May 02, 2024 at 03:59:03PM -0400, Frank Li wrote:
> dma_set_mask_and_coherent() should never fail when the mask is >= 32bit,
> unless the architecture has no DMA support. So no need check for the error
> and also no need to set dma_set_mask_and_coherent(32) as a fallback.
> 
> Even if dma_set_mask_and_coherent(48) fails due to the lack of DMA support
> (theoretically), then dma_set_mask_and_coherent(32) will also fail for the
> same reason. So the fallback doesn't make sense.
> 
> Due to the above reasons, let's simplify the code by setting the streaming
> and coherent DMA mask to 48 bits.
> 
> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
> Signed-off-by: Frank Li <Frank.Li@xxxxxxx>
> ---

Reviewed-by: Niklas Cassel <cassel@xxxxxxxxxx>




[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