On Thu, Mar 20, 2025 at 02:04:49PM +0000, David Howells wrote: > NeilBrown <neil@xxxxxxxxxx> wrote: > > > Also the path component name is passed as "name" and "len" which are > > (confusingly?) separate by the "base". In some cases the len in simply > > "strlen" and so passing a qstr using QSTR() would make the calling > > clearer. > > Other callers do pass separate name and len which are stored in a > > struct. Sometimes these are already stored in a qstr, other times it > > easily could be. > > > > So this patch changes these three functions to receive a 'struct qstr', > > and improves the documentation. > > You did want 'struct qstr' not 'struct qstr *' right? I think there are > arches where this will cause the compiler to skip a register argument or two > if it's the second argument or third argument - i386 for example. Plus you > have an 8-byte alignment requirement because of the u64 in it that may suck if > passed through several layers of function. Not just that - you end up with *two* struct qstr instances for no good reason, copying from the one passed by value field-by-field into the other one, then passing the *address* of the copy to the functions that do actual work.