From patchwork Mon Jan 21 08:47:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 10773353 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DB7A41390 for ; Mon, 21 Jan 2019 08:48:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CDCD128899 for ; Mon, 21 Jan 2019 08:48:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C186029016; Mon, 21 Jan 2019 08:48:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6EF7D28ED5 for ; Mon, 21 Jan 2019 08:48:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729338AbfAUIsH (ORCPT ); Mon, 21 Jan 2019 03:48:07 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:38499 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729246AbfAUIsH (ORCPT ); Mon, 21 Jan 2019 03:48:07 -0500 Received: by mail-wm1-f65.google.com with SMTP id m22so9926228wml.3 for ; Mon, 21 Jan 2019 00:48:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=oNAEuic8TN2JCwvO+MVhFf5QRjvhdSap6qMFsy8Im+g=; b=ijcBVtI5Mvbtoi8VWwc4u26mjMgDm6dGdbKnvtNRDG6qhgGzQSl0t27azpCpUaAohE OTKWzMf0O61ZH5W0KBaNyTrQCKGg9DGs3jss9xS01ZvrHf8szU+EDzpgPZYfUBckUXWl U2dxKZByRW3NomQHXHLGg2fj/zie1/wNLWENY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=oNAEuic8TN2JCwvO+MVhFf5QRjvhdSap6qMFsy8Im+g=; b=MFv+4wlHxkbZ3qImLyrGyrTsFGIF4eobvHm5TEsPsyY9CHc3T2q3RNnEW/hv2EMHjM 9ubOu0kCrJHMKhlJoAnMUwLm7wS9yXAuR/3U/1Q6KaEU17asyYigeSaB3hQR3JvQFKxQ x7mLWv3Arnp9XsLsqkPz2xn4n6U1Tj7usnvnKIaZ6FmEHrShakm5IL8wsKfG1YgZF6HG 330+SCI+gg8XhEnWTyp2SZlSewdoPgVsnzUIfgVb6oX8ItVSM99E2VuxUh+2kRtq5Q7l ZpADIMykiZzQvprohERkmS6qg+mEw1UgdBxsvRCdwbxqWDs3+OQGJx1hQc4DblYRE2MQ hAlQ== X-Gm-Message-State: AJcUuke0QTYOBkpGVjKnKwXlyPK69CgFN0gqMhy5lgbXfWLIKg26jycW GjVLoKB/bvW+gRWCXtY6sC63jQ== X-Google-Smtp-Source: ALg8bN5SQhDA44ig/6S6drHt3wH2vTVbxwD4KXdqiQLwIZKDo9XI10lnB4hKpIBl6/MC4LZgmDIrpQ== X-Received: by 2002:a1c:2501:: with SMTP id l1mr24878582wml.102.1548060485508; Mon, 21 Jan 2019 00:48:05 -0800 (PST) Received: from localhost ([114.143.52.189]) by smtp.gmail.com with ESMTPSA id d16sm73763366wru.52.2019.01.21.00.48.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Jan 2019 00:48:04 -0800 (PST) From: Amit Kucheria To: linux-kernel@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org, viresh.kumar@linaro.org, "Rafael J. Wysocki" , linux-pm@vger.kernel.org Subject: [PATCH] cpufreq: Replace open-coded << with BIT() Date: Mon, 21 Jan 2019 14:17:37 +0530 Message-Id: <2501c48872e5fa9c26f06216c19955d70b263a85.1548060067.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.17.1 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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);