IB/iser: Fix dma_nents type definition
authorMax Gurtovoy <maxg@mellanox.com>
Tue, 26 Feb 2019 10:22:11 +0000 (12:22 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 4 Mar 2019 19:40:25 +0000 (15:40 -0400)
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>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/ulp/iser/iscsi_iser.h

index 120b408295603d31cccceeffaeea9b7ee4778540..a7aeaa0c6fbc9281cde32678dfc8f087ba97ddfd 100644 (file)
@@ -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 */