From: Ingo Oeser Date: Wed, 19 Sep 2007 11:11:41 +0000 (+0800) Subject: [CRYPTO] blkcipher: Use max() in blkcipher_get_spot() to state the intention X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5aaff0c8f7dd3515c9f1ca57f86463f30779acc7;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [CRYPTO] blkcipher: Use max() in blkcipher_get_spot() to state the intention Use max in blkcipher_get_spot() instead of open coding it. Signed-off-by: Ingo Oeser Signed-off-by: Herbert Xu --- diff --git a/crypto/blkcipher.c b/crypto/blkcipher.c index 5991c53eabac..9c49770837c2 100644 --- a/crypto/blkcipher.c +++ b/crypto/blkcipher.c @@ -65,7 +65,7 @@ static inline void blkcipher_unmap_dst(struct blkcipher_walk *walk) static inline u8 *blkcipher_get_spot(u8 *start, unsigned int len) { u8 *end_page = (u8 *)(((unsigned long)(start + len - 1)) & PAGE_MASK); - return start > end_page ? start : end_page; + return max(start, end_page); } static inline unsigned int blkcipher_done_slow(struct crypto_blkcipher *tfm,