提交 74eb94f7 编写于 作者: C Chuck Lever 提交者: Jens Axboe

sg_last() should use unsigned loop index variable

Clean up: fix a mixed sign comparison in sg_last() accidentally
introduced by commit 70eb8040.  The sign of the loop index variable
should match the sign of the "nents" argument.
Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
Signed-off-by: NJens Axboe <axboe@carl.home.kernel.dk>
上级 30fa0d0f
......@@ -150,7 +150,7 @@ static inline struct scatterlist *sg_last(struct scatterlist *sgl,
struct scatterlist *ret = &sgl[nents - 1];
#else
struct scatterlist *sg, *ret = NULL;
int i;
unsigned int i;
for_each_sg(sgl, sg, nents, i)
ret = sg;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册