VisionFive2 Linux kernel

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

More than 9999 Commits   33 Branches   55 Tags
author: Wu Bo <wubo40@huawei.com> 2021-05-25 16:15:19 +0800 committer: Herbert Xu <herbert@gondor.apana.org.au> 2021-06-03 20:24:04 +0800 commit: 7551a074700a4093f5556a5ae51c1f83ea6b96ba parent: e9009fb227fa66a66cef02a36fb51c288f411e0d
Commit Summary:
crypto: af_alg - use DIV_ROUND_UP helper macro for calculations
Diffstat:
1 file changed, 1 insertion, 1 deletion
diff --git a/crypto/af_alg.c b/crypto/af_alg.c
index 18cc82dc4a42..8bd288d2b089 100644
--- a/crypto/af_alg.c
+++ b/crypto/af_alg.c
@@ -411,7 +411,7 @@ int af_alg_make_sg(struct af_alg_sgl *sgl, struct iov_iter *iter, int len)
 	if (n < 0)
 		return n;
 
-	npages = (off + n + PAGE_SIZE - 1) >> PAGE_SHIFT;
+	npages = DIV_ROUND_UP(off + n, PAGE_SIZE);
 	if (WARN_ON(npages == 0))
 		return -EINVAL;
 	/* Add one extra for linking */