Re: [PATCH v1 1/4] list: Introduce list_count() to count existing nodes

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

 



On Mon, Nov 14, 2022 at 05:47:21PM +0000, Matthew Wilcox wrote:
> On Mon, Nov 14, 2022 at 06:03:00PM +0200, Andy Shevchenko wrote:
> > Oh, nice! I will fix this for v2.
> 
> list_count() is an antipattern.  I don't have any of the patches in
> my inbox, so maybe there's a great reason for doing this, but my
> immediate response is: NAK.

When we are trying to hide iterator variable in many cases, leaving the current
code alive will allow explicit access to it. If it's not a problem, why to
bother with the other list APIs then?

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux