[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240723000604.241443-2-hch@lst.de>
Date: Mon, 22 Jul 2024 17:05:55 -0700
From: Christoph Hellwig <hch@....de>
To: Robin Murphy <robin.murphy@....com>,
Marek Szyprowski <m.szyprowski@...sung.com>
Cc: iommu@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: [PATCH 1/3] dma-mapping: don't return errors from dma_set_min_align_mask
If dev->dma_parms is not allocate that indicates a grave bug in the
implementation of a DMA-capable bus. There isn't much the driver can
do in terms of error handling, so just warn and continue as DMA
operations will fail anyway.
Signed-off-by: Christoph Hellwig <hch@....de>
---
include/linux/dma-mapping.h | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index f693aafe221f2c..cfd6bafec3f944 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -575,13 +575,12 @@ static inline unsigned int dma_get_min_align_mask(struct device *dev)
return 0;
}
-static inline int dma_set_min_align_mask(struct device *dev,
+static inline void dma_set_min_align_mask(struct device *dev,
unsigned int min_align_mask)
{
if (WARN_ON_ONCE(!dev->dma_parms))
- return -EIO;
+ return;
dev->dma_parms->min_align_mask = min_align_mask;
- return 0;
}
#ifndef dma_get_cache_alignment
--
2.43.0
Powered by blists - more mailing lists