Re: [PATCH] crypto: blkcipher_get_spot() handling of buffer at end of page

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Herbert Xu <herbert@...>
Cc: Bob Gilligan <gilligan@...>, <linux-kernel@...>, Linux Crypto Mailing List <linux-crypto@...>
Date: Monday, September 10, 2007 - 3:46 pm

Hi Herbert,

On Monday 10 September 2007, Herbert Xu wrote:

What about using max() for this to make your intention obvious?

static inline u8 *blkcipher_get_spot(u8 *start, unsigned int len)
{
	u8 *end_page = (u8 *)(((unsigned long)(start + len - 1)) & PAGE_MASK); 
	return max(start, end_page);
}


Best Regards

Ingo Oeser 
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] crypto: blkcipher_get_spot() handling of buffer ..., Ingo Oeser, (Mon Sep 10, 3:46 pm)