Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7826953rdb; Thu, 4 Jan 2024 08:51:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IH7gGaYV3mHQoAeCuDLNvd8A4jsoh/ysjD+e9ZiwtB5Bmr1EzeWDEjySbvRcPXxbGbFCLdG X-Received: by 2002:a17:90a:3f10:b0:28c:f95:621f with SMTP id l16-20020a17090a3f1000b0028c0f95621fmr938674pjc.33.1704387081635; Thu, 04 Jan 2024 08:51:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704387081; cv=none; d=google.com; s=arc-20160816; b=TU4lEIqKrPYBhXfADX9xmUG5MzLrRXvJeTRDI81xvjr7bg3OAOY9oiDphMvQYWSQad C+IzWTF4u55XmrvIR+smffXLmOTKda9TEf/6qH1coRH204TDCN+xebATBcBpjBZ34Dyy cMjK5IYf+XkodjBV8p37QB+khJT7iouB56aaSC7bJGNCyfG6VuOrUsnTu16LaGYHv4AZ FhkHY8chG/auHXwXzBJg/fZNgRR7PQqe/Uchao5Rho8J9e+QxES2NKAosvAc1l6Kh3W/ 9M1H7m+OyHv8+gIlc6HPrEfiZO0gvA7BJj+lltC6pLrLxQQHTlxoib9xfTTflRg81OaE 8mGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=oMarO7jeCJNEnOQVZ5ft78CmnhKoHDQTCy8o4MX3pg4=; fh=WnvTElNlEQk4UtgNVd1wjQOgsCAyArJ2eenrGoTFFF8=; b=HXs2T1vvu1YqVNQIFYvtTxyaBVzdKKzoJNFYmvnQmn8OZA0A2NjIu50JX1V/VyE/HM /ysIOlaNN0m/jyydLJ6Gqv9Y5/5ZHpM+qOJ3kzNWD4TIOVWD1KO0NNatyReWabymGqiE nts10k/2HdcQ87KIYvl1LSplnAv5gAR2Nglafu7TiCyDGLlNOGQ9jlZ2aTpeU+OWsmKl Ksv3fZfuqBBhW4PW6V0XSwQQAlLpVS8nP6naXwApmc8ijZOnkA8H9azuA4IjvUfhpaC9 YLIAwlaJaOIGLsxwwGP4O8QE2EOc6FYAJGNFuD2VNB7EFw6Ermd2zoBUbhfpo0HnMx86 DQlQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-16970-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16970-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id nd4-20020a17090b4cc400b0028bd32c8b24si3277118pjb.181.2024.01.04.08.51.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 08:51:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-16970-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-16970-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16970-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 8D99EB21B6D for ; Thu, 4 Jan 2024 16:51:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 85A7F25560; Thu, 4 Jan 2024 16:50:41 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B5351288D5; Thu, 4 Jan 2024 16:50:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1BA391007; Thu, 4 Jan 2024 08:51:25 -0800 (PST) Received: from e126645.arm.com (unknown [10.57.76.27]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 310D83F64C; Thu, 4 Jan 2024 08:50:35 -0800 (PST) From: Pierre Gondois To: linux-kernel@vger.kernel.org Cc: Pierre Gondois , Greg Kroah-Hartman , =?UTF-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= , Todd Kjos , Martijn Coenen , Joel Fernandes , Christian Brauner , Carlos Llamas , Suren Baghdasaryan , Coly Li , Kent Overstreet , Marco Elver , Kees Cook , Lucas De Marchi , Ingo Molnar , Andy Shevchenko , linux-bcache@vger.kernel.org Subject: [PATCH v2 2/3] binder: Use of hlist_count_nodes() Date: Thu, 4 Jan 2024 17:49:34 +0100 Message-Id: <20240104164937.424320-3-pierre.gondois@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240104164937.424320-1-pierre.gondois@arm.com> References: <20240104164937.424320-1-pierre.gondois@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Make use of the newly added hlist_count_nodes(). Signed-off-by: Pierre Gondois --- drivers/android/binder.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index 92128aae2d06..f9ca4d58d825 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -6077,9 +6077,7 @@ static void print_binder_node_nilocked(struct seq_file *m, struct binder_work *w; int count; - count = 0; - hlist_for_each_entry(ref, &node->refs, node_entry) - count++; + count = hlist_count_nodes(&node->refs); seq_printf(m, " node %d: u%016llx c%016llx hs %d hw %d ls %d lw %d is %d iw %d tr %d", node->debug_id, (u64)node->ptr, (u64)node->cookie, -- 2.25.1