From: Christoph Hellwig <hch@lst.de>
To: Robin Murphy <robin.murphy@arm.com>,
Marek Szyprowski <m.szyprowski@samsung.com>
Cc: iommu@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH 1/3] dma-mapping: don't return errors from dma_set_min_align_mask
Date: Mon, 22 Jul 2024 17:05:55 -0700 [thread overview]
Message-ID: <20240723000604.241443-2-hch@lst.de> (raw)
In-Reply-To: <20240723000604.241443-1-hch@lst.de>
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@lst.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
next prev parent reply other threads:[~2024-07-23 0:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-23 0:05 remove the dma_set_{max_seg_size,seg_boundary,min_align_mask} return value Christoph Hellwig
2024-07-23 0:05 ` Christoph Hellwig [this message]
2024-07-23 0:05 ` [PATCH 2/3] dma-mapping: don't return errors from dma_set_seg_boundary Christoph Hellwig
2024-08-01 12:00 ` Marek Szyprowski
2024-08-01 12:36 ` Robin Murphy
2024-08-01 13:33 ` Christoph Hellwig
2024-08-02 11:53 ` Robin Murphy
2024-07-23 0:05 ` [PATCH 3/3] dma-mapping: don't return errors from dma_set_max_seg_size Christoph Hellwig
2024-07-30 13:13 ` remove the dma_set_{max_seg_size,seg_boundary,min_align_mask} return value Robin Murphy
2024-07-30 15:20 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240723000604.241443-2-hch@lst.de \
--to=hch@lst.de \
--cc=iommu@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=robin.murphy@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®