lkml.org 
[lkml]   [2020]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm: Remove src/dst mm parameter in copy_page_range()
On Fri, Oct 02, 2020 at 02:28:58PM -0300, Jason Gunthorpe wrote:
> On Fri, Oct 02, 2020 at 01:14:29PM -0400, Peter Xu wrote:
> > On Fri, Oct 02, 2020 at 08:43:12AM -0300, Jason Gunthorpe wrote:
> > > > -static int copy_pte_range(struct mm_struct *dst_mm, struct mm_struct *src_mm,
> > > > - pmd_t *dst_pmd, pmd_t *src_pmd, struct vm_area_struct *vma,
> > > > - struct vm_area_struct *new,
> > > > +static int copy_pte_range(pmd_t *dst_pmd, pmd_t *src_pmd,
> > > > + struct vm_area_struct *vma, struct vm_area_struct *new,
> > > > unsigned long addr, unsigned long end)
> > >
> > > I link this, my only minor quibble is the mixing of dst/src and new
> > > language, and then reversing the order in each place. Would read
> > > better to be consistent:
> > >
> > > copy_pte_range(dst_vma, dst_pmd, src_vma, src_pmd, addr, end)
> >
> > I have no strong opinion on the ordering, but I agree the names are clearer.
> > Considering normally we put the same type of parameters to be together, how
> > about:
> >
> > copy_pte_range(dst_vma, src_vma, dst_pmd, src_pmd, addr, end)
>
> I was looking at the order of (dst_pmd, src_pmd, src_vma, dest_vma)
>
> Whichever, just have some logic to it :)

Oh, sure. :)

--
Peter Xu

\
 
 \ /
  Last update: 2020-10-02 20:04    [W:0.107 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site