The patch titled Subject: scatterlist: refactor the sg_nents has been added to the -mm tree. Its filename is scatterlist-add-sg_nents-fix.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Maxim Levitsky <maximlevitsky@xxxxxxxxx> Subject: scatterlist: refactor the sg_nents Replace 'while' with 'for' as suggested by Tejun Heo Signed-off-by: Maxim Levitsky <maximlevitsky@xxxxxxxxx> Cc: Alex Dubov <oakad@xxxxxxxxx> Cc: Tejun Heo <tj@xxxxxxxxxx> Cc: Jens Axboe <axboe@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- lib/scatterlist.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff -puN lib/scatterlist.c~scatterlist-add-sg_nents-fix lib/scatterlist.c --- a/lib/scatterlist.c~scatterlist-add-sg_nents-fix +++ a/lib/scatterlist.c @@ -49,12 +49,9 @@ EXPORT_SYMBOL(sg_next); **/ int sg_nents(struct scatterlist *sg) { - int nents = 0; - while (sg) { + int nents; + for (nents = 0; sg; sg = sg_next(sg)) nents++; - sg = sg_next(sg); - } - return nents; } EXPORT_SYMBOL(sg_nents); _ Patches currently in -mm which might be from maximlevitsky@xxxxxxxxx are scatterlist-atomic-sg_mapping_iter-no-longer-needs-disabled-irqs.patch scatterlist-add-sg_nents.patch scatterlist-add-sg_nents-fix.patch memstick-add-support-for-legacy-memorysticks.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html