Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1841125pxb; Wed, 9 Feb 2022 05:44:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJwMQyu2lYFStDW1l4EsVXR3FKoUu9//bIrMMlLi6oNfXm4iubrWkSlVC8ZI5bwDIL6s2qjw X-Received: by 2002:a17:903:11c5:: with SMTP id q5mr2192420plh.136.1644414274750; Wed, 09 Feb 2022 05:44:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644414274; cv=none; d=google.com; s=arc-20160816; b=nK8KUWTdRWBZ/v9jVKNcY2MHRNkkhgEbACjlaQZB/y9s6I2KVLbNJFf6CrcNRGShjZ mPC8u8hnalPl9Yr1JYiRl/cCDUPKqSkksaACqY5fB92STWyZx7QmzopG3Y7K8R8a2vlY njLd8x0nHfUdtQ4m/6jhgtS8x08chVDFcJfso0wfGn9Sm5VADalImWZGer+uCPst5i/D F642SFTwF7AqdiU/s5QEKYS0GdkMtEUb/sA+Hfmi7pScxQh5sxUlV1o368OA2KhUwXd/ lyhXqy8U2GWu0UA3QX472M02zHmDwiRSo3gg2/7aGigXQXmzVcRsldWGWYd09glL6noj fCVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=4l/aFNwd63uVLKNzeMm/2/pR6vs/tYGDEs6LgxVDxlI=; b=0pg9Qma+EQ0xTmyxRwfrGvVFVLXR2IXvbUzy2xvdmY/vjsJAv3mHHbZrhXrV4TjcTE BdjYtHbhhPWxY2ULltcKliAm+Jx+8KBHDZ8Ec0W2YGxmylpUaL4zrhVXSCfbQxhTT55z xWrfdcsAo+cSM29/3JQJG9IZgI0tJ81wJZ69imL69kmK3A6lo2yMImSDtkxTwiGykHNa XUAUqyh2S9PwcJTsQge9FFMkuhaCNWeBo5YMzwPcJgtY+w6gRmoGYpywrdz4Hp91bXI1 nfDkTe5TedkXWXU/Ike2qNHQeG4wEzrwY1EYmSzqpJKCwm/4n36ACa34P09a7pTdGWFR CS4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=r1fiqywm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id x13si5515105pge.535.2022.02.09.05.44.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 05:44:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=r1fiqywm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4BB35C03E929; Wed, 9 Feb 2022 02:25:52 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232035AbiBIGRy (ORCPT + 99 others); Wed, 9 Feb 2022 01:17:54 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:54470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237976AbiBIGPZ (ORCPT ); Wed, 9 Feb 2022 01:15:25 -0500 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1014E00ED57 for ; Tue, 8 Feb 2022 22:15:29 -0800 (PST) Received: by mail-pf1-x436.google.com with SMTP id n23so2599533pfo.1 for ; Tue, 08 Feb 2022 22:15:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=4l/aFNwd63uVLKNzeMm/2/pR6vs/tYGDEs6LgxVDxlI=; b=r1fiqywmY+ZXjFns4iy4OyiewaVgMm0NsTnoz629RyyIhdlq8v/wSp0eNSiEThtCR+ tbze/g+/ol7lhlw5SoWxsXGKGJm/BGjeK2OgefivPq8rC/kd69by2eh/XAqS08Sz/yOp oRdKYg4ECKxNmOp8ch3Adi0KmBe6qZnsrDnjvAtP0A0IKsdlBEfJKAgoSI9agqb90W/b NysePOlOF4FtXKvvLKwcGXHSMGRgspJpDIYkrZ247uRQLIvuqe9vSvTGqQNBvKuSTBvb FEn9RBMF7W0H69VY3UD26kT52kWkGmcpqOVYYvyY8A448QS24UGkCk/tQsaqo6X3Pt14 4MzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=4l/aFNwd63uVLKNzeMm/2/pR6vs/tYGDEs6LgxVDxlI=; b=QokFqKm44alTcLaxNbStMCEJCcjlVHD6RkLeVdN3WBe7NP4+1Ccldvdd0o3l9Gi2gA 8jXSIVfm7uqet89xOLYLCoyrlRkK6053walWNuk1X4SZ42pV60Bem1LK6oaZahwRREW/ 6ji9xJ1WDdVXy6FP/8KZo+Dd/HIiQtnZn5Ewjkq0D5UkOTeqsI/8w7FagoWskhaM0Fkb 4yHZ50JIljLjswBs4BB9xK1IwiksfkWAV8P7+Nbk7VaVMNYNLr9EwxxHWqSn4JDKPcgw kU3+zU6QYGxt3ZxJaCb17UN1Bzf/gZbLVNjOorcDLYTByciD22ezuJcl+Gnt02Ev37Al TnKQ== X-Gm-Message-State: AOAM530/g4gTPaLAX7htuPhQYqh5FVzz5pwd44xh1q9AYQ8rAFithr4o UkrQZeG3G2j8/7kCvYOr5qCydA== X-Received: by 2002:a63:f50f:: with SMTP id w15mr716344pgh.113.1644387321236; Tue, 08 Feb 2022 22:15:21 -0800 (PST) Received: from localhost ([136.185.132.167]) by smtp.gmail.com with ESMTPSA id o2sm6879778pga.57.2022.02.08.22.15.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Feb 2022 22:15:20 -0800 (PST) Date: Wed, 9 Feb 2022 11:45:18 +0530 From: Viresh Kumar To: Yury Norov Cc: Andy Shevchenko , Rasmus Villemoes , Andrew Morton , =?utf-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= , Greg Kroah-Hartman , 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" , Sudeep Holla , 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: <20220209061518.4xxc3hsswrfgg5u4@vireshk-i7> 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> User-Agent: NeoMutt/20180716-391-311a52 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 23-01-22, 10:38, 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. > > Signed-off-by: Yury Norov > --- > drivers/cpufreq/qcom-cpufreq-hw.c | 2 +- > drivers/cpufreq/scmi-cpufreq.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) Applied. Thanks. -- viresh