Re: [PATCH v3 4/6] zbud: memset zbud_header to 0 during init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 08, 2013 at 03:29:38PM +0200, Krzysztof Kozlowski wrote:
> memset zbud_header to 0 during init instead of manually assigning 0 to
> members. Currently only two members needs to be initialized to 0 but
> further patches will add more of them.

Acked-by: Seth Jennings <sjenning@xxxxxxxxxxxxxxxxxx>

> 
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@xxxxxxxxxxx>
> ---
>  mm/zbud.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/mm/zbud.c b/mm/zbud.c
> index 6db0557..0edd880 100644
> --- a/mm/zbud.c
> +++ b/mm/zbud.c
> @@ -133,8 +133,7 @@ static int size_to_chunks(int size)
>  static struct zbud_header *init_zbud_page(struct page *page)
>  {
>  	struct zbud_header *zhdr = page_address(page);
> -	zhdr->first_chunks = 0;
> -	zhdr->last_chunks = 0;
> +	memset(zhdr, 0, sizeof(*zhdr));
>  	INIT_LIST_HEAD(&zhdr->buddy);
>  	INIT_LIST_HEAD(&zhdr->lru);
>  	return zhdr;
> -- 
> 1.7.9.5
> 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]