Following 2a047e0662ae ("dma-mapping: return an unsigned int from dma_map_sg{,_attrs}") change the return value of ib_dma_map_sg{,attrs} to unsigned int. Cc: Jason Gunthorpe <jgg@xxxxxxxx> Cc: Leon Romanovsky <leon@xxxxxxxxxx> Cc: Christoph Hellwig <hch@xxxxxx> Cc: linux-rdma@xxxxxxxxxxxxxxx Cc: linux-kernel@xxxxxxxxxxxxxxx Signed-off-by: Jack Wang <jinpu.wang@xxxxxxxxx> --- drivers/infiniband/core/device.c | 2 +- include/rdma/ib_verbs.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c index d275db195f1a..72489294391d 100644 --- a/drivers/infiniband/core/device.c +++ b/drivers/infiniband/core/device.c @@ -2721,7 +2721,7 @@ void ib_set_device_ops(struct ib_device *dev, const struct ib_device_ops *ops) EXPORT_SYMBOL(ib_set_device_ops); #ifdef CONFIG_INFINIBAND_VIRT_DMA -int ib_dma_virt_map_sg(struct ib_device *dev, struct scatterlist *sg, int nents) +unsigned int ib_dma_virt_map_sg(struct ib_device *dev, struct scatterlist *sg, int nents) { struct scatterlist *s; int i; diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 975d6e9efbcb..49256bf8cbf5 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -4101,8 +4101,8 @@ static inline void ib_dma_unmap_page(struct ib_device *dev, dma_unmap_page(dev->dma_device, addr, size, direction); } -int ib_dma_virt_map_sg(struct ib_device *dev, struct scatterlist *sg, int nents); -static inline int ib_dma_map_sg_attrs(struct ib_device *dev, +unsigned int ib_dma_virt_map_sg(struct ib_device *dev, struct scatterlist *sg, int nents); +static inline unsigned int ib_dma_map_sg_attrs(struct ib_device *dev, struct scatterlist *sg, int nents, enum dma_data_direction direction, unsigned long dma_attrs) @@ -4163,7 +4163,7 @@ static inline void ib_dma_unmap_sgtable_attrs(struct ib_device *dev, * @nents: The number of scatter/gather entries * @direction: The direction of the DMA */ -static inline int ib_dma_map_sg(struct ib_device *dev, +static inline unsigned int ib_dma_map_sg(struct ib_device *dev, struct scatterlist *sg, int nents, enum dma_data_direction direction) { -- 2.34.1