lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZME23DS/Elz2XPey@casper.infradead.org>
Date:   Wed, 26 Jul 2023 16:08:12 +0100
From:   Matthew Wilcox <willy@...radead.org>
To:     "Liam R. Howlett" <Liam.Howlett@...cle.com>,
        Peng Zhang <zhangpeng.00@...edance.com>, corbet@....net,
        akpm@...ux-foundation.org, brauner@...nel.org, surenb@...gle.com,
        michael.christie@...cle.com, peterz@...radead.org,
        mathieu.desnoyers@...icios.com, npiggin@...il.com,
        avagin@...il.com, linux-mm@...ck.org, linux-doc@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 03/11] maple_tree: Add some helper functions

On Wed, Jul 26, 2023 at 11:02:52AM -0400, Liam R. Howlett wrote:
> * Peng Zhang <zhangpeng.00@...edance.com> [230726 04:10]:
> >  static inline
> > -enum maple_type mas_parent_type(struct ma_state *mas, struct maple_enode *enode)
> > +enum maple_type ma_parent_type(struct maple_tree *mt, struct maple_node *node)
> 
> I was trying to keep ma_* prefix to mean the first argument is
> maple_node and mt_* to mean maple_tree.  I wasn't entirely successful
> with this and I do see why you want to use ma_, but maybe reverse the
> arguments here?

I think your first idea is better.  Usually we prefer to order the
arguments by "containing thing" to "contained thing".  So always use
(struct address_space *, struct folio *), for example.  Or (struct
mm_struct *, struct vm_area_struct *).

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ