diff mbox series

[1/1] IB/iser: Fix dma_nents type definition

Message ID 1551176531-4641-1-git-send-email-maxg@mellanox.com (mailing list archive)
State Mainlined
Commit c1545f1a200f4adc4ef8dd534bf33e2f1aa22c2f
Delegated to: Jason Gunthorpe
Headers show
Series [1/1] IB/iser: Fix dma_nents type definition | expand

Commit Message

Max Gurtovoy Feb. 26, 2019, 10:22 a.m. UTC
The retured value from ib_dma_map_sg saved in dma_nents variable. To
avoid future mismatch between types, define dma_nents as an integer
instead of unsigned.

Fixes: 57b26497fabe ("IB/iser: Pass the correct number of entries for dma mapped SGL ")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Israel Rukshin <israelr@mellanox.com>
Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
---
 drivers/infiniband/ulp/iser/iscsi_iser.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sagi Grimberg Feb. 26, 2019, 9:19 p.m. UTC | #1
Acked-by: Sagi Grimberg <sagi@grimberg.me>
Dan Carpenter Feb. 28, 2019, 12:52 p.m. UTC | #2
Thanks.  I reviewed all the users and changing it to signed doesn't
cause any issues.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>

regards,
dan carpenter
Jason Gunthorpe March 4, 2019, 7:48 p.m. UTC | #3
On Tue, Feb 26, 2019 at 12:22:11PM +0200, Max Gurtovoy wrote:
> The retured value from ib_dma_map_sg saved in dma_nents variable. To
> avoid future mismatch between types, define dma_nents as an integer
> instead of unsigned.
> 
> Fixes: 57b26497fabe ("IB/iser: Pass the correct number of entries for dma mapped SGL ")
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Reviewed-by: Israel Rukshin <israelr@mellanox.com>
> Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
> Acked-by: Sagi Grimberg <sagi@grimberg.me>
> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
>  drivers/infiniband/ulp/iser/iscsi_iser.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to for-next, thanks

Jason
diff mbox series

Patch

diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.h b/drivers/infiniband/ulp/iser/iscsi_iser.h
index 120b408..a7aeaa0 100644
--- a/drivers/infiniband/ulp/iser/iscsi_iser.h
+++ b/drivers/infiniband/ulp/iser/iscsi_iser.h
@@ -197,7 +197,7 @@  struct iser_data_buf {
 	struct scatterlist *sg;
 	int                size;
 	unsigned long      data_len;
-	unsigned int       dma_nents;
+	int                dma_nents;
 };
 
 /* fwd declarations */