aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2007-10-26 13:29:48 -0400
committerJens Axboe <jens.axboe@oracle.com>2007-10-29 04:18:04 -0400
commit513f54b78f9594927ede66b6c66a70c1bae0c4ca (patch)
treeb4e260bfa648c84de8477c9b49a67d6c86652e23 /include/linux
parent74eb94f7b84f4e631a0e020991fb16f17ce85ab7 (diff)
sg_init_table() should use unsigned loop index variable
Clean up: fix a mixed sign comparison in sg_init_table() accidentally introduced by commit d6ec0842. The sign of the loop index variable should match the sign of the "nents" argument. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Jens Axboe <axboe@carl.home.kernel.dk>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/scatterlist.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h
index 19b751aabd16..32326c293d7b 100644
--- a/include/linux/scatterlist.h
+++ b/include/linux/scatterlist.h
@@ -243,7 +243,7 @@ static inline void sg_init_table(struct scatterlist *sgl, unsigned int nents)
243 sg_mark_end(sgl, nents); 243 sg_mark_end(sgl, nents);
244#ifdef CONFIG_DEBUG_SG 244#ifdef CONFIG_DEBUG_SG
245 { 245 {
246 int i; 246 unsigned int i;
247 for (i = 0; i < nents; i++) 247 for (i = 0; i < nents; i++)
248 sgl[i].sg_magic = SG_MAGIC; 248 sgl[i].sg_magic = SG_MAGIC;
249 } 249 }