Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3511800pxb; Mon, 24 Jan 2022 11:06:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJwj9jdTnypczYvHXqjeKebU7VyIFM9ScW2BjUAId1v0C9qIAv0XRdUQ5i55TP9B4N4KVYtr X-Received: by 2002:a63:ce0d:: with SMTP id y13mr502728pgf.102.1643051165165; Mon, 24 Jan 2022 11:06:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643051165; cv=none; d=google.com; s=arc-20160816; b=MDltaAodKSj90bZQP8sJvhW6Jxtm0d7t7R/iGF2ReW7wFeuWNGwu+jpyMwAIGWZ1bL vUUi5uAC+kYWnJut6oBZnl4HrAkd55ImmqQoKx6BfZ/7BJgGmTW7l97hxz2kRCSwe83X tj+ElEBRM6Y+PEk1GMATw1KimN5ZC+BwyEzNWRyIRbPY+ew485N3UMQVNN1VjNlg0hb9 68UmJ/BS5hAZi8/0eMtP+mlPKOiRSZtu4Nd09e7crfIhjlmY25jAdPQyJl/a4Z+H+qzt pWBHT66KclS0byc5ADWoOu+sgyWQV6LhrGnWz1++ZnmNXcT+MWrJfziyyJ1/NjE4dB9B KwQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=ii9TOVaRDB9U3zq8Nb6H4nGyJsnCgn/ayGOuzGhbW9Q=; b=L+WuUq+nTr2rSmHUjEhtPPWy4JHjNVAqIuOVL9g7om5MM0udvJL9M72Ti5nV/XItYg udMXBM16KA/F2sx6CYmcibattR//KTec6PMVsRPqxAojrih2f8KbiDu3AiPWtaxr40JN Hg7jInw1OCMOlmIudkzMkFc0UbgPigF2XNjV9ABLkH0UwtAFG8oYsESbMU3hOe8dmI59 Jc4qiXVT1QZQoW+awMfmQCrTkFs8tK3692Z+7DIPI6pHeuy9dgL0J5oNPzc56ZOHQNHO TtTY/r3tuAgtuTrfkNRkYZxYv5xlwEn+QIebRGNFvNL5E+YvIF8NXUIZYnnevE2EzikO rc2w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n13si15283324pgc.177.2022.01.24.11.05.52; Mon, 24 Jan 2022 11:06:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236259AbiAXKly (ORCPT + 99 others); Mon, 24 Jan 2022 05:41:54 -0500 Received: from foss.arm.com ([217.140.110.172]:57228 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231843AbiAXKlx (ORCPT ); Mon, 24 Jan 2022 05:41:53 -0500 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 CDE606D; Mon, 24 Jan 2022 02:41:52 -0800 (PST) Received: from bogus (unknown [10.57.34.236]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2E97D3F73B; Mon, 24 Jan 2022 02:41:48 -0800 (PST) Date: Mon, 24 Jan 2022 10:41:13 +0000 From: Sudeep Holla To: Yury Norov Cc: Andy Shevchenko , Rasmus Villemoes , Andrew Morton , =?utf-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= , Greg Kroah-Hartman , Sudeep Holla , Peter Zijlstra , David Laight , Joe Perches , Dennis Zhou , Emil Renner Berthing , Nicholas Piggin , Matti Vaittinen , Alexey Klimov , linux-kernel@vger.kernel.org, Andy Gross , Bjorn Andersson , "Rafael J. Wysocki" , Viresh Kumar , Cristian Marussi , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 16/54] cpufreq: replace cpumask_weight with cpumask_empty where appropriate Message-ID: <20220124104113.ccbcyipd5gtweulz@bogus> References: <20220123183925.1052919-1-yury.norov@gmail.com> <20220123183925.1052919-17-yury.norov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220123183925.1052919-17-yury.norov@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jan 23, 2022 at 10:38:47AM -0800, Yury Norov wrote: > drivers/cpufreq calls cpumask_weight() to check if any bit of a given > cpumask is set. We can do it more efficiently with cpumask_empty() because > cpumask_empty() stops traversing the cpumask as soon as it finds first set > bit, while cpumask_weight() counts all bits unconditionally. > Reviewed-by: Sudeep Holla (for SCMI cpufreq driver) -- Regards, Sudeep