diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2007-10-26 13:29:47 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2007-10-29 04:18:04 -0400 |
commit | 74eb94f7b84f4e631a0e020991fb16f17ce85ab7 (patch) | |
tree | 9d08217290654cefa5505d085a032ca60d021e5f /include/linux/scatterlist.h | |
parent | 30fa0d0f0c0ab2aa0d4c2f88eda49eaa19ea6f8d (diff) |
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: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Jens Axboe <axboe@carl.home.kernel.dk>
Diffstat (limited to 'include/linux/scatterlist.h')
-rw-r--r-- | include/linux/scatterlist.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h index b2ec8421b89f..19b751aabd16 100644 --- a/include/linux/scatterlist.h +++ b/include/linux/scatterlist.h | |||
@@ -150,7 +150,7 @@ static inline struct scatterlist *sg_last(struct scatterlist *sgl, | |||
150 | struct scatterlist *ret = &sgl[nents - 1]; | 150 | struct scatterlist *ret = &sgl[nents - 1]; |
151 | #else | 151 | #else |
152 | struct scatterlist *sg, *ret = NULL; | 152 | struct scatterlist *sg, *ret = NULL; |
153 | int i; | 153 | unsigned int i; |
154 | 154 | ||
155 | for_each_sg(sgl, sg, nents, i) | 155 | for_each_sg(sgl, sg, nents, i) |
156 | ret = sg; | 156 | ret = sg; |