summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>2018-08-29 23:29:21 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-13 08:51:54 +0100
commit0c40b942f6a99f2ade4d43ed5186bbba1c88d9f6 (patch)
tree24c6d19b83852e217d2558b0309b0b50bbe8e5f9 /include/linux
parent0e6ec8b39105ef5f63a9af25a60fc2f7d2a682a2 (diff)
downloadlinux-stable-0c40b942f6a99f2ade4d43ed5186bbba1c88d9f6.tar.gz
linux-stable-0c40b942f6a99f2ade4d43ed5186bbba1c88d9f6.tar.bz2
linux-stable-0c40b942f6a99f2ade4d43ed5186bbba1c88d9f6.zip
dma-mapping: fix return type of dma_set_max_seg_size()
[ Upstream commit c9d76d0655c06b8c1f944e46c4fd9e9cf4b331c0 ] The function dma_set_max_seg_size() can return either 0 on success or -EIO on error. Change its return type from unsigned int to int to capture this. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/dma-mapping.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index 1db6a6b46d0d..669cde2fa872 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -674,8 +674,7 @@ static inline unsigned int dma_get_max_seg_size(struct device *dev)
return SZ_64K;
}
-static inline unsigned int dma_set_max_seg_size(struct device *dev,
- unsigned int size)
+static inline int dma_set_max_seg_size(struct device *dev, unsigned int size)
{
if (dev->dma_parms) {
dev->dma_parms->max_segment_size = size;