On Thu, Apr 08, 2021 at 09:53:13PM +0530, Padmakar Kalghatgi wrote:
> +            /*
> +             *   The first PRP list entry, pointed by PRP2 can contain
> +             *   offsets. Hence, we need calculate the no of entries in
> +             *   prp2 based on the offset it has.
> +             */

This comment has some unnecessary spacing at the beginning.

> +            nents = (n->page_size - (prp2 % n->page_size)) >> 3;

page_size is a always a power of two, so let's replace the costly modulo
with:

        nents = (n->page_size - (prp2 & (n->page_size - 1))) >> 3;

Reply via email to