[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADtm3G6UcuLmESz+dFmeMfLfJ=SWwkAiHLUHHKxvmjYTvwZRog@mail.gmail.com>
Date: Tue, 24 Feb 2015 12:54:38 -0800
From: Gregory Fong <gregory.0xf0@...il.com>
To: Danesh Petigara <dpetigara@...adcom.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Michal Nazarewicz <mina86@...a86.com>,
Joonsoo Kim <iamjoonsoo.kim@....com>,
"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>,
Laurent Pinchart <laurent.pinchart+renesas@...asonboard.com>,
linux-mm@...ck.org,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mm: cma: fix CMA aligned offset calculation
[removed stable from cc]
On Tue, Feb 24, 2015 at 11:55 AM, Danesh Petigara
<dpetigara@...adcom.com> wrote:
> diff --git a/mm/cma.c b/mm/cma.c
> index 75016fd..58f37bd 100644
> --- a/mm/cma.c
> +++ b/mm/cma.c
> @@ -70,9 +70,13 @@ static unsigned long cma_bitmap_aligned_offset(struct cma *cma, int align_order)
>
> if (align_order <= cma->order_per_bit)
> return 0;
> - alignment = 1UL << (align_order - cma->order_per_bit);
> - return ALIGN(cma->base_pfn, alignment) -
> - (cma->base_pfn >> cma->order_per_bit);
> +
> + /*
> + * Find a PFN aligned to the specified order and return
> + * an offset represented in order_per_bits.
> + */
> + return (ALIGN(cma->base_pfn, (1UL << align_order))
> + - cma->base_pfn) >> cma->order_per_bit;
It was noticed that this doesn't remove the now-unused 'alignment'
variable, so I think Danesh is planning to submit an updated patch.
Best regards,
Gregory
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists