Re: [PATCH rdma-next v1 2/4] lib/scatterlist: Add support in dynamically allocation of SG entries

Christoph Hellwig
2020-09-15T22:28:13Z

> + /* We decrease one since the prvious last sge in used to
> + * chainning.
> + */

The normal style would be:

/*
* We decrease one since the prvious last sge in used to
* chain the chunks together.
*/

(also fixing up what I think it should be saying while I'm at it)

> + * Thus if @nents is bigger than @max_ents, the scatterlists will be
> + * chained in units of @max_ents.
> + *
> + **/
> +static int sg_alloc_next(struct sg_table *table, struct scatterlist *last,
> + unsigned int nents, unsigned int max_ents,
> + gfp_t gfp_mask)
> +{
> + return sg_alloc(table, last, nents, max_ents, NULL, 0, gfp_mask,
> + sg_kmalloc);
> +}

This helper seems unused in this patch. For bisection you probably
want to move it into the next patch with the user.

In fact I'm not even sure there is much of a point in splitting out
this patch either.