On Sat, Nov 28, 2020 at 06:22:39PM +0800, Weihang Li wrote: > The variable 'cnt' is used to represent the max number of sge an SQ WQE can > use at first, then it means how many extended sge an SQ has. In addition, > this function has no need to return a value. So refactor and encapsulate > the parts of getting number of extended sge a WQE can use to make it easier > to understand. > > Signed-off-by: Weihang Li <liweihang@xxxxxxxxxx> > --- > drivers/infiniband/hw/hns/hns_roce_qp.c | 60 +++++++++++++++------------------ > 1 file changed, 28 insertions(+), 32 deletions(-) > Thanks, Reviewed-by: Leon Romanovsky <leonro@xxxxxxxxxx>