Re: [PATCH 4/9] add helpers for pseudo's user-list's size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 12, 2018 at 11:28:04PM +0100, Luc Van Oostenryck wrote:
> On Mon, Feb 12, 2018 at 02:11:34PM -0800, Linus Torvalds wrote:
> > On Mon, Feb 12, 2018 at 2:02 PM, Luc Van Oostenryck
> > <luc.vanoostenryck@xxxxxxxxx> wrote:
> > > Also add has_user(), a wrapper around the above that
> > > can directly be used on a pseudo.
> > 
> > You add that wrapper, but then:
> > 
> > > -       if (ptr_list_size((struct ptr_list *) *list) == 0)
> > > +       if (pseudo_user_list_size(*list) == 0)
> > 
> > you don't actually *use* it. That seems pointless.
> 
> Yes, I know it's not ideal.
> My intention when I made has_users() was to use it too,
> but I also made it to directly take a pseudo as argument
> (which is the common case). And then when wanting to use
> it I saw that there is pseudo here, only the pseudo_user_list.
> So, I had to use the intermediate pseudo_user_list_size()
> here instead of has_users().
> 
> I may change has_users() to take the user list instead
> of the pseudo but my mental model was pseudos. 

I've splitted the patch in two, one with leaving
the changes with pseudo_user_list_size() and another
one introduncing has_users(). I think that it makes
things easier to follow.

Thanks for noticing.
-- Luc
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux