Subject: Re: [PATCH 03/11] powerpc/nvram: nvram_create_partitions() now uses bytes

From: Michael Ellerman <[email-masked]>
Date: Mon, 02 Aug 2010 13:47:02 +1000

On Mon, 2010-08-02 at 10:55 +1000, Benjamin Herrenschmidt wrote:
> This converts nvram_create_partition() to use a size in bytes
> rather than blocks. It does the appropriate alignment internally
> 
> The size passed is also the data size (ie. doesn't include the
> header anymore).
> 
> Signed-off-by: Benjamin Herrenschmidt <[email-masked]>
> ---
>  arch/powerpc/kernel/nvram_64.c |   20 ++++++++++++++------
>  1 files changed, 14 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/powerpc/kernel/nvram_64.c b/arch/powerpc/kernel/nvram_64.c
> index 974b3ec..b0f2114 100644
> --- a/arch/powerpc/kernel/nvram_64.c
> +++ b/arch/powerpc/kernel/nvram_64.c
> @@ -34,10 +34,10 @@
>  
>  #undef DEBUG_NVRAM
>  
> -#define NVRAM_HEADER_LEN 16 /* sizeof(struct nvram_header) */
> -#define NVRAM_BLOCK_LEN 16
> -#define NVRAM_MAX_REQ (2080/NVRAM_BLOCK_LEN)
> -#define NVRAM_MIN_REQ (1056/NVRAM_BLOCK_LEN)
> +#define NVRAM_HEADER_LEN	sizeof(struct nvram_header)
> +#define NVRAM_BLOCK_LEN		NVRAM_HEADER_LEN
> +#define NVRAM_MAX_REQ		2079
> +#define NVRAM_MIN_REQ		1055

You don't change any callers, but that's because they use these #defines
right.

cheers