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-Url: https://git.stricted.de/?a=commitdiff_plain;h=dafd9e94580c6fdcc27b5750b6d2c1987ca46f5a;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.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 704caae69c42..97f817f4eb78 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h @@ -618,8 +618,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;