IB/core: Remove a set-but-not-used variable from ib_sg_to_pages()
PATCH 1/1 IB/core: Remove a set-but-not-used variable from ib_sg_to_pages()
Detected this by building the IB core with W=1. See also patch "IB core: Fix ib_sg_to_pages()" (commit 8f5ba10ed40a).
--- drivers/infiniband/core/verbs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/infiniband/core/verbs.c +1 -2
@@ -1530,7 +1530,7 @@ int ib_sg_to_pages(struct ib_mr *mr, int (*set_page)(struct ib_mr *, u64)) {struct scatterlist *sg; -u64 last_end_dma_addr =0 , last_page_addr =0 ; +u64 last_end_dma_addr =0 ;unsigned int last_page_off =0 ;u64 page_mask = ~((u64 )mr->page_size -1 );int i, ret;
@@ -1572,7 +1572,6 @@ next_page: mr->length += dma_len; last_end_dma_addr = end_dma_addr; - last_page_addr = end_dma_addr & page_mask; last_page_off = end_dma_addr & ~page_mask; }
Signature · 6 lines
2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Leon Romanovsky
Reviewed-byQuoted 2 lines · Bart Van Assche
Detected this by building the IB core with W=1. See also patch "IB core: Fix
ib_sg_to_pages()" (commit8f5ba10ed40a).
Quoted 36 lines
Signed-off-by Bart Van Assche <[email protected]>Cc Sagi Grimberg <sagig-VPRAkNaXOzVWk0Htik3J/[email protected]>Cc Christoph Hellwig <[email protected]>--- drivers/infiniband/core/verbs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/infiniband/core/verbs.c +1
-2@@ -1530,7 +1530,7 @@ int ib_sg_to_pages(struct ib_mr *mr, int (*set_page)(struct ib_mr *, u64)) {struct scatterlist *sg; -u64 last_end_dma_addr =0 , last_page_addr =0 ; +u64 last_end_dma_addr =0 ;unsigned int last_page_off =0 ;u64 page_mask = ~((u64 )mr->page_size -1 );int i, ret;@@ -1572,7 +1572,6 @@ next_page: mr->length += dma_len; last_end_dma_addr = end_dma_addr; - last_page_addr = end_dma_addr & page_mask; last_page_off = end_dma_addr & ~page_mask; }Signature · 6 lines
2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Sagi Grimberg
Acked-byThanks Bart,
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Christoph Hellwig
Reviewed-byLooks fine,
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Doug Ledford
AppliedQuoted 25 lines · Bart Van Assche
Detected this by building the IB core with W=1. See also patch "IB core: Fix
ib_sg_to_pages()" (commit8f5ba10ed40a).Signed-off-by Bart Van Assche <[email protected]>Cc Sagi Grimberg <sagig-VPRAkNaXOzVWk0Htik3J/[email protected]>Cc Christoph Hellwig <[email protected]>--- drivers/infiniband/core/verbs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/infiniband/core/verbs.c +1
-1@@ -1530,7 +1530,7 @@ int ib_sg_to_pages(struct ib_mr *mr, int (*set_page)(struct ib_mr *, u64)) {struct scatterlist *sg; -u64 last_end_dma_addr =0 , last_page_addr =0 ; +u64 last_end_dma_addr =0 ;unsigned int last_page_off =0 ;u64 page_mask = ~((u64 )mr->page_size -1 );int i, ret;
drivers/infiniband/core/verbs.c next_page: · line 1577
Quoted 7 lines
drivers/infiniband/core/verbs.c +0
-1@@ -1572,7 +1572,6 @@ next_page: mr->length += dma_len; last_end_dma_addr = end_dma_addr; - last_page_addr = end_dma_addr & page_mask; last_page_off = end_dma_addr & ~page_mask; }
Thanks, applied.
Signature · 2 lines
Doug Ledford <[email protected]> GPG KeyID: 0E572FDD