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

Michael Ellerman michael at ellerman.id.au
Mon Aug 2 13:47:02 EST 2010


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 <benh at kernel.crashing.org>
> ---
>  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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20100802/d79491b8/attachment.pgp>


More information about the Linuxppc-dev mailing list