[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181106141542.08a9d7de30a439ec9fe50486@linux-foundation.org>
Date: Tue, 6 Nov 2018 14:15:42 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Alexey Skidanov <alexey.skidanov@...el.com>
Cc: sbates@...thlin.com, logang@...tatee.com, danielmentz@...gle.com,
mathieu.desnoyers@...icios.com, linux-kernel@...r.kernel.org,
labbott@...hat.com
Subject: Re: [PATCH] lib/genaloc: Fix allocation of aligned buffer from
non-aligned chunk
On Tue, 6 Nov 2018 14:20:53 +0200 Alexey Skidanov <alexey.skidanov@...el.com> wrote:
> On success, gen_pool_first_fit_align() returns the bit number such that
> chunk_start_addr + (bit << order) is properly aligned. On failure,
> the bitmap size parameter is returned.
>
> When the chunk_start_addr isn't aligned properly, the
> chunk_start_addr + (bit << order) isn't aligned too.
>
> To fix this, gen_pool_first_fit_align() takes into account
> the chunk_start_addr alignment and returns the bit value such that
> chunk_start_addr + (bit << order) is properly aligned
> (exactly as it done in CMA).
>
> ...
>
> --- a/include/linux/genalloc.h
> +++ b/include/linux/genalloc.h
>
> ...
>
> + struct gen_pool *pool, unsigned long start_add)
>
> ...
>
> + struct gen_pool *pool, unsigned long start_add)
>
> ...
>
> + struct gen_pool *pool, unsigned long start_add)
>
> ...
>
We have three typos here. Which makes me wonder why we're passing the
new argument and then not using it?
Powered by blists - more mailing lists