Skip to content

Commit

Permalink
sg_init_table() should use unsigned loop index variable
Browse files Browse the repository at this point in the history
Clean up: fix a mixed sign comparison in sg_init_table() accidentally
introduced by commit d6ec084.  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>
  • Loading branch information
Chuck Lever authored and Jens Axboe committed Oct 29, 2007
1 parent 74eb94f commit 513f54b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/scatterlist.h
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit 513f54b

Please sign in to comment.