From: Niklas Söderlund Date: Wed, 29 Aug 2018 21:29:21 +0000 (+0200) Subject: dma-mapping: fix return type of dma_set_max_seg_size() X-Git-Tag: v4.19.89~143 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0c40b942f6a99f2ade4d43ed5186bbba1c88d9f6;p=thirdparty%2Fkernel%2Fstable.git 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 Reviewed-by: Geert Uytterhoeven Signed-off-by: Christoph Hellwig Signed-off-by: Sasha Levin --- diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index 1db6a6b46d0d3..669cde2fa8723 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;