summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaoquan He <hebaoquan@kylinos.cn>2026-09-03 19:18:32 +0800
committerAndrew Morton <akpm@linux-foundation.org>2026-10-14 17:20:12 -0700
commitced1ffe5fa07b7d8445eb296e33b7a8ba07a6ebf (patch)
treea9f4e831bff0e35b8af86b76db69b454045c9de4
parentf0ef6e92ebd1c015cbe56b46952ca732c04f05f9 (diff)
downloadlinux-next-ced1ffe5fa07b7d8445eb296e33b7a8ba07a6ebf.tar.gz
linux-next-ced1ffe5fa07b7d8445eb296e33b7a8ba07a6ebf.zip
spi: atmel: don't use GFP_DMA when calling dma_alloc_coherent()
dma_alloc_coherent() allocates the DMA buffer with the device's addressing limitation in mind; the DMA core picks the zone from the device's coherent DMA mask and ignores GFP_DMA passed by the caller. Remove the redundant GFP_DMA flag. Link: https://lore.kernel.org/20260903111836.1777265-10-hebaoquan@kylinos.cn Signed-off-by: Baoquan He <hebaoquan@kylinos.cn> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Cc: Christoph Hellwig <hch@lst.de> Cc: Harry Yoo <harry@kernel.org>
-rw-r--r--drivers/spi/spi-atmel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c
index c8012c82c3a7..e91e84fdbe8f 100644
--- a/drivers/spi/spi-atmel.c
+++ b/drivers/spi/spi-atmel.c
@@ -624,7 +624,7 @@ static int atmel_spi_configure_dma(struct spi_controller *host,
if (IS_ENABLED(CONFIG_SOC_SAM_V4_V5)) {
as->addr_tx_bbuf = dma_alloc_coherent(dev, SPI_MAX_DMA_XFER,
&as->dma_addr_tx_bbuf,
- GFP_KERNEL | GFP_DMA);
+ GFP_KERNEL);
if (!as->addr_tx_bbuf) {
err = -ENOMEM;
goto err_release_dma;
@@ -632,7 +632,7 @@ static int atmel_spi_configure_dma(struct spi_controller *host,
as->addr_rx_bbuf = dma_alloc_coherent(dev, SPI_MAX_DMA_XFER,
&as->dma_addr_rx_bbuf,
- GFP_KERNEL | GFP_DMA);
+ GFP_KERNEL);
if (!as->addr_rx_bbuf) {
err = -ENOMEM;
goto err_release_dma;