VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Gilad Ben-Yossef <gilad@benyossef.com> 2017-02-27 14:28:27 -0800 committer: Linus Torvalds <torvalds@linux-foundation.org> 2017-02-27 18:43:46 -0800 commit: 1d5210ef706523529d3cc16fd70be0a466253466 parent: 95e91b831f87ac8e1f8ed50c14d709089b4e01b8
Commit Summary:
scatterlist: reorder compound boolean expression
Diffstat:
1 file changed, 1 insertion, 1 deletion
diff --git a/lib/scatterlist.c b/lib/scatterlist.c
index 004fc70fc56a..393920fddcb9 100644
--- a/lib/scatterlist.c
+++ b/lib/scatterlist.c
@@ -666,7 +666,7 @@ size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents, void *buf,
 
 	local_irq_save(flags);
 
-	while (sg_miter_next(&miter) && offset < buflen) {
+	while ((offset < buflen) && sg_miter_next(&miter)) {
 		unsigned int len;
 
 		len = min(miter.length, buflen - offset);