lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220826095615.74328-3-jinpu.wang@ionos.com>
Date:   Fri, 26 Aug 2022 11:56:15 +0200
From:   Jack Wang <jinpu.wang@...os.com>
To:     jgg@...pe.ca, leon@...nel.org, linux-rdma@...r.kernel.org
Cc:     Christoph Hellwig <hch@....de>, linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] RDMA: dma-mapping: Return an unsigned int from ib_dma_map_sg{,_attrs}

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@...pe.ca>
Cc: Leon Romanovsky <leon@...nel.org>
Cc: Christoph Hellwig <hch@....de>
Cc: linux-rdma@...r.kernel.org
Cc: linux-kernel@...r.kernel.org

Signed-off-by: Jack Wang <jinpu.wang@...os.com>
---
 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ