diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2022-01-01 15:48:25 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-01-02 12:21:16 +0000 |
commit | c95e078069bf9bfcb66272fac162c79be6c9170b (patch) | |
tree | 90b88014f06c27e88651dc8be0982063baf7f8e9 /net/smc/smc_core.h | |
parent | c5180ad0c2784924b3526ec2bd3ee9e0aa05724b (diff) | |
download | linux-c95e078069bf9bfcb66272fac162c79be6c9170b.tar.gz linux-c95e078069bf9bfcb66272fac162c79be6c9170b.tar.bz2 linux-c95e078069bf9bfcb66272fac162c79be6c9170b.zip |
tehuti: Use dma_set_mask_and_coherent() and simplify code
Use dma_set_mask_and_coherent() instead of unrolling it with some
dma_set_mask()+dma_set_coherent_mask().
Moreover, as stated in [1], dma_set_mask_and_coherent() with a 64-bit mask
will never fail if dev->dma_mask is non-NULL.
So, if it fails, the 32 bits case will also fail for the same reason.
That said, 'pci_using_dac' can only be 1 after a successful
dma_set_mask_and_coherent().
Simplify code and remove some dead code accordingly.
[1]: https://lkml.org/lkml/2021/6/7/398
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc/smc_core.h')
0 files changed, 0 insertions, 0 deletions