Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp717361rdb; Sat, 6 Jan 2024 06:18:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IF7otchB8cFe+eCmyTH7PYbMuX5JO/c2h+vfP0v0WDRzBrvgPhAk8juituq4LCJvgSbNfEl X-Received: by 2002:ac8:7c44:0:b0:429:89a2:6cd1 with SMTP id o4-20020ac87c44000000b0042989a26cd1mr384971qtv.67.1704550714601; Sat, 06 Jan 2024 06:18:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704550714; cv=none; d=google.com; s=arc-20160816; b=iv64rxZPyPGK6qA8Ej18p5Xg5DlM8Weae9i9DuJ9HtRtYzpwXpp0TMS6B/nx7rL3kD 8XXCrdYmcG20fhJ0gBPePd2oC/+L434SC+3XwCypkefe0qcmFWVQPZaocnElR0V6hoIf bOsJZVoA+Naja9lebou8iMKACKRugQyTyten21/PIicJI2BtGi26bP6Nj0wValAkRNzC FtJALM7xNIzm24vWS+Hde4iQ0QT3+e0JAF4ZY9khjFRTuSe5/2DuoIcmr0gU2R0viVDI YDZHtkNf+SiZntrdpHvHyMdKtElCqfVYrJPtBduQkvYvLR0XmXwJZW1sg0V/naFKilMT y4vA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=organization:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=M+bdJB21PTYfxWkACl56m3K8qDRLHB7Jzbo4wORbuHI=; fh=JwoXawmgtxWXyRFlgkRjrK1YiOjKbib8GB0bJmhEN8Y=; b=UCHJy9hjSKi1kzlfTlMcl4uWOlwoJMonvmUnk/jTd1ya7oNypVEj9STJ0Er+xSVVrU RBEbD6G4f3vljOeU92OpJa1OozhyKe9o8X3wJ4VqZ7e3bQQJQySWwW2uo7/5On1W764R p3fq4i6JF97NHStjClC7ePkJtYtlmmxrM0KltcqfpZ0gsf0HfJw10FFF7gijfFRlVyHl XAsyzHv9iYfvrJZ4RuazL6y4ZqLOnKZXG79Eb3/0d6XfO2XKLulniFnd2ljFqpmxvG9Z bKt/p8q5KjGN2TQ30yYQZc+yXT7rbbI3pLBjc6DNjLeo8xuOVodHkcDLgsYhYF3M93GR GEJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=K7gH1ZWe; spf=pass (google.com: domain of linux-kernel+bounces-18593-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18593-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id c13-20020a05622a024d00b004297b4cffcfsi2910717qtx.82.2024.01.06.06.18.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Jan 2024 06:18:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-18593-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=K7gH1ZWe; spf=pass (google.com: domain of linux-kernel+bounces-18593-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18593-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 5CAE61C211C0 for ; Sat, 6 Jan 2024 14:18:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7B5A6749F; Sat, 6 Jan 2024 14:18:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="K7gH1ZWe" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7AB547483 for ; Sat, 6 Jan 2024 14:18:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1704550706; x=1736086706; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=6o5SASJAjHggjTPxF+4jiLSwlA4i/EomIqUIbo30sTY=; b=K7gH1ZWeRUcbQ7q0opRW7XXhx4URnZ21SVs9qTfsHShmkP02JvvITWv5 T9dxwHCBE8aI7WRlirpoufCcF1EbEO+8N0GgE0btmuf1RNmwqOAfS/YTZ cdNAW/kHE+VGHfVqusGx2WSCL/lUKYzJcUlJKtqAozsg3NbmIeoeo51/h yfgsdtmRrSg1wQWbuI8DM1VUpmWsw/V8u5a12lmvlvt47pVvQFw+ZK/GO q4MeDbIjCRW2lP/eBr3ViEhwSE+UF1+ECtEhNRK4ak1YuCq0PVxog9c6u clhZoGqY6sruLZIm+4aZJrshLtEgABGrmfaTt1JOs21xSKsEolagiNDev g==; X-IronPort-AV: E=McAfee;i="6600,9927,10945"; a="461958656" X-IronPort-AV: E=Sophos;i="6.04,337,1695711600"; d="scan'208";a="461958656" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jan 2024 06:18:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10945"; a="1028009404" X-IronPort-AV: E=Sophos;i="6.04,337,1695711600"; d="scan'208";a="1028009404" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga006.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jan 2024 06:18:22 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1rM7VE-0000000BvWx-0ucP; Sat, 06 Jan 2024 16:18:20 +0200 Date: Sat, 6 Jan 2024 16:18:19 +0200 From: Andy Shevchenko To: Marco Elver Cc: Pierre Gondois , linux-kernel@vger.kernel.org, Kees Cook , Lucas De Marchi , Jani Nikula , Ingo Molnar Subject: Re: [PATCH] list: Add hlist_count_nodes() Message-ID: References: <20240103090241.164817-1-pierre.gondois@arm.com> <2f4a5ea1-daa2-4ede-bdc0-6692d7d52e8c@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 On Wed, Jan 03, 2024 at 02:46:00PM +0100, Marco Elver wrote: > On Wed, 3 Jan 2024 at 13:04, Pierre Gondois wrote: > > On 1/3/24 12:25, Marco Elver wrote: > > > On Wed, 3 Jan 2024 at 10:02, Pierre Gondois wrote: > > >> > > >> Add a function to count nodes in a hlist. hlist_count_nodes() > > >> is similar to list_count_nodes(). > > >> > > >> Signed-off-by: Pierre Gondois > > > > > > Is this patch part of another patch series? As-is, this will be dead > > > code, and there's no guarantee someone will just go and delete it in > > > future. Although this function looks useful, we also should avoid > > > adding new dead code. > > > > The function is indeed not used in the project right now. I needed > > it for a private module. If it helps integrating the function and > > not make it dead code, maybe I could add usages at the following > > places: > > - drivers/gpu/drm/drm_hashtab.c::print_binder_node_nilocked() > > - drivers/md/bcache/sysfs.c::bch_cache_max_chain() > > If this function allows to simplify these other places, by all means > go ahead. That would look a lot better than having an unused function. +1, produce a little series with those drivers being cleaned up. -- With Best Regards, Andy Shevchenko