Message ID | 1477757993-32186-1-git-send-email-weiyj.lk@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
On Sat, Oct 29, 2016 at 04:19:53PM +0000, Wei Yongjun wrote: > From: Wei Yongjun <weiyongjun1@huawei.com> > > Using list_move_tail() instead of list_del() + list_add_tail(). > > Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Thanks, Reviewed-by: Leon Romanovsky <leonro@mellanox.com> > --- > drivers/infiniband/hw/qedr/verbs.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/infiniband/hw/qedr/verbs.c b/drivers/infiniband/hw/qedr/verbs.c > index a615142..cdaddf9 100644 > --- a/drivers/infiniband/hw/qedr/verbs.c > +++ b/drivers/infiniband/hw/qedr/verbs.c > @@ -2413,8 +2413,7 @@ static void handle_completed_mrs(struct qedr_dev *dev, struct mr_info *info) > */ > pbl = list_first_entry(&info->inuse_pbl_list, > struct qedr_pbl, list_entry); > - list_del(&pbl->list_entry); > - list_add_tail(&pbl->list_entry, &info->free_pbl_list); > + list_move_tail(&pbl->list_entry, &info->free_pbl_list); > info->completed_handled++; > } > } > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html
> Using list_move_tail() instead of list_del() + list_add_tail(). > > Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> > --- > drivers/infiniband/hw/qedr/verbs.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/infiniband/hw/qedr/verbs.c > b/drivers/infiniband/hw/qedr/verbs.c > index a615142..cdaddf9 100644 > --- a/drivers/infiniband/hw/qedr/verbs.c > +++ b/drivers/infiniband/hw/qedr/verbs.c > @@ -2413,8 +2413,7 @@ static void handle_completed_mrs(struct qedr_dev > *dev, struct mr_info *info) > */ > pbl = list_first_entry(&info->inuse_pbl_list, > struct qedr_pbl, list_entry); > - list_del(&pbl->list_entry); > - list_add_tail(&pbl->list_entry, &info->free_pbl_list); > + list_move_tail(&pbl->list_entry, &info->free_pbl_list); > info->completed_handled++; > } > } Thanks Acked-by: Ram Amrani <Ram.Amrani@cavium.com> -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 10/29/2016 12:19 PM, Wei Yongjun wrote: > From: Wei Yongjun <weiyongjun1@huawei.com> > > Using list_move_tail() instead of list_del() + list_add_tail(). > > Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Thanks, applied.
diff --git a/drivers/infiniband/hw/qedr/verbs.c b/drivers/infiniband/hw/qedr/verbs.c index a615142..cdaddf9 100644 --- a/drivers/infiniband/hw/qedr/verbs.c +++ b/drivers/infiniband/hw/qedr/verbs.c @@ -2413,8 +2413,7 @@ static void handle_completed_mrs(struct qedr_dev *dev, struct mr_info *info) */ pbl = list_first_entry(&info->inuse_pbl_list, struct qedr_pbl, list_entry); - list_del(&pbl->list_entry); - list_add_tail(&pbl->list_entry, &info->free_pbl_list); + list_move_tail(&pbl->list_entry, &info->free_pbl_list); info->completed_handled++; } }