[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZGyN/XRu779eglnk@pc636>
Date: Tue, 23 May 2023 11:57:17 +0200
From: Uladzislau Rezki <urezki@...il.com>
To: Christoph Hellwig <hch@...radead.org>
Cc: "Uladzislau Rezki (Sony)" <urezki@...il.com>, linux-mm@...ck.org,
Andrew Morton <akpm@...ux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>, Baoquan He <bhe@...hat.com>,
Lorenzo Stoakes <lstoakes@...il.com>,
Matthew Wilcox <willy@...radead.org>,
"Liam R . Howlett" <Liam.Howlett@...cle.com>,
Dave Chinner <david@...morbit.com>,
"Paul E . McKenney" <paulmck@...nel.org>,
Joel Fernandes <joel@...lfernandes.org>,
Oleksiy Avramchenko <oleksiy.avramchenko@...y.com>
Subject: Re: [PATCH 1/9] mm: vmalloc: Add va_alloc() helper
On Mon, May 22, 2023 at 11:05:57PM -0700, Christoph Hellwig wrote:
> On Mon, May 22, 2023 at 01:08:41PM +0200, Uladzislau Rezki (Sony) wrote:
> > Currently __alloc_vmap_area() function contains an open codded
> > logic that finds and adjusts a VA based on allocation request.
> >
> > Introduce a va_alloc() helper that adjusts found VA only. It
> > will be used later at least in two places.
> >
> > There is no a functional change as a result of this patch.
> >
> > Signed-off-by: Uladzislau Rezki (Sony) <urezki@...il.com>
> > ---
> > mm/vmalloc.c | 41 ++++++++++++++++++++++++++++-------------
> > 1 file changed, 28 insertions(+), 13 deletions(-)
> >
> > diff --git a/mm/vmalloc.c b/mm/vmalloc.c
> > index 31ff782d368b..409285b68a67 100644
> > --- a/mm/vmalloc.c
> > +++ b/mm/vmalloc.c
> > @@ -1482,6 +1482,32 @@ adjust_va_to_fit_type(struct rb_root *root, struct list_head *head,
> > return 0;
> > }
> >
> > +static unsigned long
> > +va_alloc(struct vmap_area *va,
> > + struct rb_root *root, struct list_head *head,
> > + unsigned long size, unsigned long align,
> > + unsigned long vstart, unsigned long vend)
>
> Prototype continuations don't use a single tab indent. Either two
> tabs (my preference) or after the opening brace. I.e.:
>
Will go with two tabs.
> static unsigned long
> va_alloc(struct vmap_area *va, struct rb_root *root, struct list_head *head,
> unsigned long size, unsigned long align, unsigned long vstart,
> unsigned long vend)
>
>
> Otherwise looks good:
>
> Reviewed-by: Christoph Hellwig <hch@....de>
>
Added.
Appreciate you look at it!
--
Uladizislau Rezki
Powered by blists - more mailing lists