lkml.org 
[lkml]   [2022]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH v10 09/69] mm: add VMA iterator
On Tue, Jun 21, 2022 at 11:10:09PM +0200, David Hildenbrand wrote:
> > +#define VMA_ITERATOR(name, mm, addr) \
> > + struct vma_iterator name = { \
> > + .mas = { \
> > + .tree = &mm->mm_mt, \
> > + .index = addr, \
> > + .node = MAS_START, \
> > + }, \
> > + }
> > +
>
> No __* and () macro magic?
>
> I'd have expected at least
>
> tree = &(__mm)->mm_mt,
> .index = (__addr),
>
> ;)

Fair, fair. Just testing that change now. I always forget to do those
things until they bite me.

> Reviewed-by: David Hildenbrand <david@redhat.com>

Appreciate the review!

diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index acbd8d03e01e..8bcbffefdc02 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -686,11 +686,11 @@ struct vma_iterator {
struct ma_state mas;
};

-#define VMA_ITERATOR(name, mm, addr) \
+#define VMA_ITERATOR(name, _mm, _addr) \
struct vma_iterator name = { \
.mas = { \
- .tree = &mm->mm_mt, \
- .index = addr, \
+ .tree = &(_mm)->mm_mt, \
+ .index = (_addr), \
.node = MAS_START, \
}, \
}
\
 
 \ /
  Last update: 2022-06-23 19:30    [W:0.116 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site