dma-direct: cleanup parameters to dma_direct_optimal_gfp_mask
authorPetr Tesarik <petrtesarik@huaweicloud.com>
Mon, 20 Feb 2023 15:06:22 +0000 (16:06 +0100)
committerChristoph Hellwig <hch@lst.de>
Tue, 28 Mar 2023 01:34:05 +0000 (10:34 +0900)
commit25a4ce564921db0973b74c04e0ea23bd2ee12a3a
treea8413d0633b5617794768d0e998aa8e556ec4782
parent0eee5ae1025699ea93d44fdb6ef2365505082103
dma-direct: cleanup parameters to dma_direct_optimal_gfp_mask

Since both callers of dma_direct_optimal_gfp_mask() pass
dev->coherent_dma_mask as the second argument, it is better to
remove that parameter altogether.

Not only is reducing number of parameters good for readability, but
the new function signature is also more logical: The optimal flags
depend only on data contained in struct device.

While touching this code, let's also rename phys_mask to phys_limit
in dma_direct_alloc_from_pool(), because it is indeed a limit.

Signed-off-by: Petr Tesarik <petrtesarik@huaweicloud.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
kernel/dma/direct.c