* [PATCH] IB/core: Remove a set-but-not-used variable from ib_sg_to_pages() @ 2015-12-29 9:45 Bart Van Assche [not found] ` <5682561F.7000400-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: Bart Van Assche @ 2015-12-29 9:45 UTC (permalink / raw) To: Doug Ledford Cc: Sagi Grimberg, Christoph Hellwig, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Detected this by building the IB core with W=1. See also patch "IB core: Fix ib_sg_to_pages()" (commit 8f5ba10ed40a). Signed-off-by: Bart Van Assche <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org> Cc: Sagi Grimberg <sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> Cc: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org> --- drivers/infiniband/core/verbs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c index 545906d..c90ed29 100644 --- a/drivers/infiniband/core/verbs.c +++ b/drivers/infiniband/core/verbs.c @@ -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; } -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 5+ messages in thread
[parent not found: <5682561F.7000400-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>]
* Re: [PATCH] IB/core: Remove a set-but-not-used variable from ib_sg_to_pages() [not found] ` <5682561F.7000400-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org> @ 2015-12-29 10:55 ` Leon Romanovsky 2015-12-29 10:58 ` Sagi Grimberg ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: Leon Romanovsky @ 2015-12-29 10:55 UTC (permalink / raw) To: Bart Van Assche Cc: Doug Ledford, Sagi Grimberg, Christoph Hellwig, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On Tue, Dec 29, 2015 at 10:45:03AM +0100, Bart Van Assche wrote: > Detected this by building the IB core with W=1. See also patch > "IB core: Fix ib_sg_to_pages()" (commit 8f5ba10ed40a). Reviewed-by: Leon Romanovsky <leon.romanovsky-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> > > Signed-off-by: Bart Van Assche <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org> > Cc: Sagi Grimberg <sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> > Cc: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org> > --- > drivers/infiniband/core/verbs.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c > index 545906d..c90ed29 100644 > --- a/drivers/infiniband/core/verbs.c > +++ b/drivers/infiniband/core/verbs.c > @@ -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; > } > > -- > 2.1.4 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > 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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] IB/core: Remove a set-but-not-used variable from ib_sg_to_pages() [not found] ` <5682561F.7000400-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org> 2015-12-29 10:55 ` Leon Romanovsky @ 2015-12-29 10:58 ` Sagi Grimberg 2015-12-30 9:42 ` Christoph Hellwig 2016-01-19 21:15 ` Doug Ledford 3 siblings, 0 replies; 5+ messages in thread From: Sagi Grimberg @ 2015-12-29 10:58 UTC (permalink / raw) To: Bart Van Assche, Doug Ledford Cc: Sagi Grimberg, Christoph Hellwig, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Thanks Bart, Acked-by: Sagi Grimberg <sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] IB/core: Remove a set-but-not-used variable from ib_sg_to_pages() [not found] ` <5682561F.7000400-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org> 2015-12-29 10:55 ` Leon Romanovsky 2015-12-29 10:58 ` Sagi Grimberg @ 2015-12-30 9:42 ` Christoph Hellwig 2016-01-19 21:15 ` Doug Ledford 3 siblings, 0 replies; 5+ messages in thread From: Christoph Hellwig @ 2015-12-30 9:42 UTC (permalink / raw) To: Bart Van Assche Cc: Doug Ledford, Sagi Grimberg, Christoph Hellwig, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Looks fine, Reviewed-by: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org> -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] IB/core: Remove a set-but-not-used variable from ib_sg_to_pages() [not found] ` <5682561F.7000400-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org> ` (2 preceding siblings ...) 2015-12-30 9:42 ` Christoph Hellwig @ 2016-01-19 21:15 ` Doug Ledford 3 siblings, 0 replies; 5+ messages in thread From: Doug Ledford @ 2016-01-19 21:15 UTC (permalink / raw) To: Bart Van Assche Cc: Sagi Grimberg, Christoph Hellwig, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org [-- Attachment #1: Type: text/plain, Size: 1384 bytes --] On 12/29/2015 04:45 AM, Bart Van Assche wrote: > Detected this by building the IB core with W=1. See also patch > "IB core: Fix ib_sg_to_pages()" (commit 8f5ba10ed40a). > > Signed-off-by: Bart Van Assche <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org> > Cc: Sagi Grimberg <sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> > Cc: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org> > --- > drivers/infiniband/core/verbs.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c > index 545906d..c90ed29 100644 > --- a/drivers/infiniband/core/verbs.c > +++ b/drivers/infiniband/core/verbs.c > @@ -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; > } > > Thanks, applied. -- Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> GPG KeyID: 0E572FDD [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 884 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-01-19 21:15 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-12-29 9:45 [PATCH] IB/core: Remove a set-but-not-used variable from ib_sg_to_pages() Bart Van Assche [not found] ` <5682561F.7000400-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org> 2015-12-29 10:55 ` Leon Romanovsky 2015-12-29 10:58 ` Sagi Grimberg 2015-12-30 9:42 ` Christoph Hellwig 2016-01-19 21:15 ` Doug Ledford
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).