All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: kernel test robot <lkp@intel.com>,
	Jakob Koschel <jakobkoschel@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Mathias Nyman <mathias.nyman@linux.intel.com>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	oe-kbuild-all@lists.linux.dev,
	Kevin Cernekee <cernekee@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: [PATCH v1 1/4] list: Introduce list_count() to count existing nodes
Date: Mon, 14 Nov 2022 19:57:16 +0200	[thread overview]
Message-ID: <Y3KBfLLyQZ7Q95bG@smile.fi.intel.com> (raw)
In-Reply-To: <Y3J/KUBu3adGPiwT@casper.infradead.org>

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



  reply	other threads:[~2022-11-14 17:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-14 11:28 [PATCH v1 1/4] list: Introduce list_count() to count existing nodes Andy Shevchenko
2022-11-14 11:28 ` [PATCH v1 2/4] usb: gadget: hid: Convert to use list_count() Andy Shevchenko
2022-11-14 11:28 ` [PATCH v1 3/4] usb: gadget: udc: bcm63xx: " Andy Shevchenko
2022-11-14 11:28 ` [PATCH v1 4/4] xhci: " Andy Shevchenko
2022-11-14 15:38 ` [PATCH v1 1/4] list: Introduce list_count() to count existing nodes kernel test robot
2022-11-14 16:03   ` Andy Shevchenko
2022-11-14 17:47     ` Matthew Wilcox
2022-11-14 17:57       ` Andy Shevchenko [this message]
2022-11-14 15:38 ` kernel test robot
2022-11-14 18:39 ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y3KBfLLyQZ7Q95bG@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=cernekee@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jakobkoschel@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=mathias.nyman@linux.intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.