Thread (9 messages) flat view 9 messages, 3 authors, 2021-01-20

Re: [RFC PATCH 4/8] mm: Separate fault info out of 'struct vm_fault'

From: Will Deacon <will@kernel.org>
Date: 2021-01-14 19:01:10
Also in: linux-mm, lkml

On Thu, Jan 14, 2021 at 10:16:13AM -0800, Linus Torvalds wrote:
On Thu, Jan 14, 2021 at 10:01 AM Will Deacon [off-list ref] wrote:
quoted
Try to clean this up by splitting the immutable fault information out
into a new 'struct vm_fault_info' which is embedded in 'struct vm_fault'
and will later be made 'const'. The vast majority of this change was
performed with a coccinelle patch:
You may have a reason for doing it this way, but my reaction to this
was: "just make the new embedded struct unnamed".

Then you wouldn't need to do all the automated coccinelle changes.

Is there some reason you didn't do that, or just a "oh, I didn't think of
it".
I tried that initially, e.g.

struct vm_fault {
	const struct {
		unsigned long address;
		...
	};
};

but I found that I had to make all of the members const to get it to work,
at which point the anonymous struct wasn't really adding anything. Did I
just botch the syntax?

Will

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help