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: 10773351 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 955E76C2 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 803EA28899 for ; Mon, 21 Jan 2019 08:48:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 72AAB29A33; 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=ham 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 0F5F528899 for ; Mon, 21 Jan 2019 08:48:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729633AbfAUIsH (ORCPT ); Mon, 21 Jan 2019 03:48:07 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:36442 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729338AbfAUIsH (ORCPT ); Mon, 21 Jan 2019 03:48:07 -0500 Received: by mail-wm1-f66.google.com with SMTP id p6so9870120wmc.1 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=QgC5llMkAI8/X2Wu7pW1rqgbbJvjk5gVuDZuSPkNeTJisvSDAkw6WTQJV3pikszLgV MCVTfcZFGubVJXOwlMCrIZnzsfOWYgSqQRD0RklWmWeeQDGxbUf82aM9ePQ9cDlH/mww 9cUmOyCiZuN98DSAYewI64XmFDebQsPJX/CE3X6sUxkp4sObbyKeVixwYKp+aZUhZLYn 6okGBNjsu/WTy8CPicw4Adup1tVX33Hq9gSuv9aGpOeE/fRY8OJfrIOm7qkB7XixTZar RViZhoq7aG+dERDD/2zRtGCSFDoRVg3wkBuyWl0YooBxj64BUCseiLGsWVTXUhjrnAqW 1HTQ== X-Gm-Message-State: AJcUukfRkOqUsfOS0WdZVxcAT0VWUywOeUWbFlcwkRuOI1nvSvSRGR5Q EJdOaG33LiyZwPsq1ZiQ8H84zwWCN3k= 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-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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);