From: Sagi Grimberg Date: Tue, 14 Apr 2015 15:08:18 +0000 (+0300) Subject: IB/iser: Remove redundant assignments in iser_reg_page_vec X-Git-Tag: firefly_0821_release~176^2~1881^2^3~10 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6847fdeb0bcd2eade5b8183d3d2857c4fd7b70d5;p=firefly-linux-kernel-4.4.55.git IB/iser: Remove redundant assignments in iser_reg_page_vec Buffer length was assigned twice, and no reason to set va to io_addr and then add the offset, just set va to io_addr + offset. This patch does not change any functionality. Signed-off-by: Sagi Grimberg Signed-off-by: Adir Lev Signed-off-by: Doug Ledford --- diff --git a/drivers/infiniband/ulp/iser/iser_memory.c b/drivers/infiniband/ulp/iser/iser_memory.c index 4e0cbbb671cc..cb308650b94a 100644 --- a/drivers/infiniband/ulp/iser/iser_memory.c +++ b/drivers/infiniband/ulp/iser/iser_memory.c @@ -392,12 +392,9 @@ int iser_reg_page_vec(struct ib_conn *ib_conn, mem_reg->lkey = mem->fmr->lkey; mem_reg->rkey = mem->fmr->rkey; - mem_reg->len = page_vec->length * SIZE_4K; - mem_reg->va = io_addr; - mem_reg->mem_h = (void *)mem; - - mem_reg->va += page_vec->offset; mem_reg->len = page_vec->data_size; + mem_reg->va = io_addr + page_vec->offset; + mem_reg->mem_h = (void *)mem; iser_dbg("PHYSICAL Mem.register, [PHYS p_array: 0x%p, sz: %d, " "entry[0]: (0x%08lx,%ld)] -> "