From: Chuck Lever Date: Fri, 26 Oct 2007 17:29:48 +0000 (+0200) Subject: sg_init_table() should use unsigned loop index variable X-Git-Tag: accepted/tizen/common/20141203.182822~26405^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=513f54b78f9594927ede66b6c66a70c1bae0c4ca;p=platform%2Fkernel%2Flinux-arm64.git 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 Cc: Jens Axboe Signed-off-by: Jens Axboe --- diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h index 19b751a..32326c2 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) sg_mark_end(sgl, nents); #ifdef CONFIG_DEBUG_SG { - int i; + unsigned int i; for (i = 0; i < nents; i++) sgl[i].sg_magic = SG_MAGIC; }