From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC34BC433FE for ; Mon, 14 Nov 2022 17:57:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6829B8E0003; Mon, 14 Nov 2022 12:57:25 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 632C88E0001; Mon, 14 Nov 2022 12:57:25 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4FC718E0003; Mon, 14 Nov 2022 12:57:25 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 423568E0001 for ; Mon, 14 Nov 2022 12:57:25 -0500 (EST) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 1D87C1A0F05 for ; Mon, 14 Nov 2022 17:57:25 +0000 (UTC) X-FDA: 80132804850.17.22F9B48 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by imf03.hostedemail.com (Postfix) with ESMTP id 3FE2D20008 for ; Mon, 14 Nov 2022 17:57:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668448644; x=1699984644; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=Cc3hg2VIM6L+Sab51F6eBaTWDmyo6t4XvJHG+xF3G0U=; b=nzaCXNTXGTD74Thps27TBZNzEz/nsn39rQsTJkO44/KM8xC4O9cBnMF1 DYbYTDDxzv9Fnp1L1e+RqH7x08oXPpDE8BJEL0oRApHs4L9ad2mTpPztt jFcniZatoXfBin80hvGJu6VjcU2AE1eoN98Nq2RlUo4/z/Afkj4tI3pEl C3iRoTT3t50UfHxiUdB2lWLgirE+YBE/veWqln+FAkY3rqQfSadL+ns6R QmVNXMuztLrRGlL3fHuwFymlIKQqf5Fw/nBfvdBCYd9iTBRCEBfFXhWBU wMwdRkfHiGivS9AxQHgLw3b7qaIH0Y8ZSqFie4mTHgonSwa6symtuEVE8 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10531"; a="376304432" X-IronPort-AV: E=Sophos;i="5.96,164,1665471600"; d="scan'208";a="376304432" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Nov 2022 09:57:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10531"; a="671657096" X-IronPort-AV: E=Sophos;i="5.96,164,1665471600"; d="scan'208";a="671657096" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga001.jf.intel.com with ESMTP; 14 Nov 2022 09:57:19 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1oudhs-00CHlc-2X; Mon, 14 Nov 2022 19:57:16 +0200 Date: Mon, 14 Nov 2022 19:57:16 +0200 From: Andy Shevchenko To: Matthew Wilcox Cc: kernel test robot , Jakob Koschel , Greg Kroah-Hartman , Mathias Nyman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, oe-kbuild-all@lists.linux.dev, Kevin Cernekee , Andrew Morton , Linux Memory Management List Subject: Re: [PATCH v1 1/4] list: Introduce list_count() to count existing nodes Message-ID: References: <20221114112842.38565-1-andriy.shevchenko@linux.intel.com> <202211142350.i0ngTfIl-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1668448644; a=rsa-sha256; cv=none; b=H6gcXDZMgCL0uJ9N1Nd+toxdlvw7SNB2co9OtlEbwv+Bl8sF1VCe0k8HA4XA/wEvpXHqEf 7ji9OATRGiCurm7sU3r//s6e5zPokRG0hgVsb1GdXLrFnn8MdxnJ589HR02kmbRaSp8pes gOT/yLFA0Irho9z1UQQqsAdcosuA4nU= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=none ("invalid DKIM record") header.d=intel.com header.s=Intel header.b=nzaCXNTX; spf=none (imf03.hostedemail.com: domain of andriy.shevchenko@linux.intel.com has no SPF policy when checking 134.134.136.100) smtp.mailfrom=andriy.shevchenko@linux.intel.com; dmarc=fail reason="No valid SPF" header.from=intel.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1668448644; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=pZOz6xr/xVbgyOV4sw8dy76DKGhg23w8D5rBGS+aK9c=; b=q8DcjFgwNW1TjtXijpZ1ldkAMbLusd5N/3DXd+P7+RaIr8JxDQcyevwaP+xyVi1Y86i2fG LnoXuYyBEF4zOA5+/y/9L2EJhVC2fKIm4AF9wul48Jxlc+tLXzuvamBq/XKblXFfxpVT+R wucnrD7HbgINJ2w5QrprOgWI31rNO4o= X-Rspam-User: X-Stat-Signature: bboq8jodx9dus865abzbiyccqssu3xh3 X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 3FE2D20008 Authentication-Results: imf03.hostedemail.com; dkim=none ("invalid DKIM record") header.d=intel.com header.s=Intel header.b=nzaCXNTX; spf=none (imf03.hostedemail.com: domain of andriy.shevchenko@linux.intel.com has no SPF policy when checking 134.134.136.100) smtp.mailfrom=andriy.shevchenko@linux.intel.com; dmarc=fail reason="No valid SPF" header.from=intel.com (policy=none) X-HE-Tag: 1668448644-288506 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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