Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7235526imu; Tue, 22 Jan 2019 02:39:38 -0800 (PST) X-Google-Smtp-Source: ALg8bN5Ct/+DkCcAAJkbJ+yPpcv5A+fWhiUuHn/SaHzgoHXuLTytZZlhucBApKGafGT1AHhD20fD X-Received: by 2002:a65:6491:: with SMTP id e17mr4289423pgv.418.1548153578712; Tue, 22 Jan 2019 02:39:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548153578; cv=none; d=google.com; s=arc-20160816; b=SE4GVGgZJmtz8sdTMJJwwdQSXTyINp9c+yWUq52dX98upOyz6tk3MsCQiApZWbkXCd pHIpPasygHI06mq8QZPY778CQ9LKPdGw9vkT1NnzD3AkjcijOUvuBHuITZpJ+w3Sh8sh bAWfxcpnetQi2BIZdcP7Yv6FVa5Yqido3vn3KP0S01yWiOfE4mKoySZ034LGbqrgV0cO Rp5bWbAUMk5v0bW48a2OlooQmmBwn5sm9Uf9iS9f5dGXwWeWWQ4TGrk7h4RJEJYoQLMy 1DHu+Tf7oSTlXOVAduB/esY5K8Acd4NLUQfdPvneb6XyXVI37vHruI4Mpv5gttSGwyA3 BTAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=umwokQx16ioa/3DhVYGoHBrKxlZsEGzEjiW0IYZ21Rc=; b=LLTAnH5ASXeJiYynlHYTIS5sjVy8cH275jp6F22w+C4EvIfH7PJUNB/BkWOhvySDBA dAf2IhwE5c0MTAoO0aMDaEeifQajBwNM84P28WAKHqMi/YrxbQjsfZzG3GK69DmUd79a wmYSmZGSRSBWFHKcVNBcM9h3SJnZZvxK0QUyLO64OZl0843MR3xHs0//+fXucWiM2y5N U38R8sEKjFVRebQBQU2FEwvr5ElvJDLge5XNxjoQz8DYT3KHaMBZmXmXazwCp0PfNBqD KoeZYw325i61YHaZ+vOBdeg4ODaFVkZto93rihWVgHXtPxcBww/tUA7NpShbfk0HVDvT ki7A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f22si15913766pgm.81.2019.01.22.02.39.23; Tue, 22 Jan 2019 02:39:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727777AbfAVKg2 (ORCPT + 99 others); Tue, 22 Jan 2019 05:36:28 -0500 Received: from cloudserver094114.home.pl ([79.96.170.134]:57354 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727734AbfAVKg1 (ORCPT ); Tue, 22 Jan 2019 05:36:27 -0500 Received: from 79.184.255.239.ipv4.supernova.orange.pl (79.184.255.239) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83.183) id 7fd8984a77e56357; Tue, 22 Jan 2019 11:36:24 +0100 From: "Rafael J. Wysocki" To: Amit Kucheria Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, viresh.kumar@linaro.org, linux-pm@vger.kernel.org Subject: Re: [PATCH] cpufreq: Replace open-coded << with BIT() Date: Tue, 22 Jan 2019 11:35:26 +0100 Message-ID: <3475847.8TT7FkP2ce@aspire.rjw.lan> In-Reply-To: <2501c48872e5fa9c26f06216c19955d70b263a85.1548060067.git.amit.kucheria@linaro.org> References: <2501c48872e5fa9c26f06216c19955d70b263a85.1548060067.git.amit.kucheria@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday, January 21, 2019 9:47:37 AM CET Amit Kucheria wrote: > Minor clean-up to use BIT() and keep checkpatch happy. Clean up the > comment formatting while we're at it to make it easier to read. > > Signed-off-by: Amit Kucheria > Reviewed-by: Stephen Boyd > --- > include/linux/cpufreq.h | 25 +++++++++++++------------ > 1 file changed, 13 insertions(+), 12 deletions(-) > > diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h > index c86d6d8bdfed..bd7fbd6a4478 100644 > --- a/include/linux/cpufreq.h > +++ b/include/linux/cpufreq.h > @@ -346,14 +346,15 @@ struct cpufreq_driver { > }; > > /* flags */ > -#define CPUFREQ_STICKY (1 << 0) /* driver isn't removed even if > - all ->init() calls failed */ > -#define CPUFREQ_CONST_LOOPS (1 << 1) /* loops_per_jiffy or other > - kernel "constants" aren't > - affected by frequency > - transitions */ > -#define CPUFREQ_PM_NO_WARN (1 << 2) /* don't warn on suspend/resume > - speed mismatches */ > + > +/* driver isn't removed even if all ->init() calls failed */ > +#define CPUFREQ_STICKY BIT(0) > + > +/* loops_per_jiffy or other kernel "constants" aren't affected by frequency transitions */ > +#define CPUFREQ_CONST_LOOPS BIT(1) > + > +/* don't warn on suspend/resume speed mismatches */ > +#define CPUFREQ_PM_NO_WARN BIT(2) > > /* > * This should be set by platforms having multiple clock-domains, i.e. > @@ -361,14 +362,14 @@ struct cpufreq_driver { > * be created in cpu/cpu/cpufreq/ directory and so they can use the same > * governor with different tunables for different clusters. > */ > -#define CPUFREQ_HAVE_GOVERNOR_PER_POLICY (1 << 3) > +#define CPUFREQ_HAVE_GOVERNOR_PER_POLICY BIT(3) > > /* > * Driver will do POSTCHANGE notifications from outside of their ->target() > * routine and so must set cpufreq_driver->flags with this flag, so that core > * can handle them specially. > */ > -#define CPUFREQ_ASYNC_NOTIFICATION (1 << 4) > +#define CPUFREQ_ASYNC_NOTIFICATION BIT(4) > > /* > * Set by drivers which want cpufreq core to check if CPU is running at a > @@ -377,13 +378,13 @@ struct cpufreq_driver { > * from the table. And if that fails, we will stop further boot process by > * issuing a BUG_ON(). > */ > -#define CPUFREQ_NEED_INITIAL_FREQ_CHECK (1 << 5) > +#define CPUFREQ_NEED_INITIAL_FREQ_CHECK BIT(5) > > /* > * Set by drivers to disallow use of governors with "dynamic_switching" flag > * set. > */ > -#define CPUFREQ_NO_AUTO_DYNAMIC_SWITCHING (1 << 6) > +#define CPUFREQ_NO_AUTO_DYNAMIC_SWITCHING BIT(6) > > int cpufreq_register_driver(struct cpufreq_driver *driver_data); > int cpufreq_unregister_driver(struct cpufreq_driver *driver_data); > Applied, thanks!