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: 156172 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp6132459jaa; Mon, 21 Jan 2019 00:48:08 -0800 (PST) X-Google-Smtp-Source: ALg8bN7uNvt6FzGZAAcpwbnC63PPnANoGsDeHhXFx5ECu0Si4s2h/L2IMqDcR/mN4FpGqkoAIlmR X-Received: by 2002:a63:990a:: with SMTP id d10mr27437818pge.279.1548060488775; Mon, 21 Jan 2019 00:48:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548060488; cv=none; d=google.com; s=arc-20160816; b=gN5qf+coc0vL+JLZJWfobLIPLHKtkKDt+JMoaVttbTsXr98Uwxyfgg0ZHCsQwwkL3H 82Zq9l3idBKsdu3knAiglpvvbKPPWb3GetVNqTRlsA20W0CsPJ80IgxUJn42Cco1cFH4 xlZr0KhU52Ao6tUHPT0ZuAggmsI1jHLsQanZKxt4dXCJsM5slEjwZElKhJwTIr8MEKxb LoEgBdpkFfoM1DEFu7HhxRh4BGJq3gRO2DxrGR0Qc/qN8jmA3otfR60/ZAF2QGVn1Ydo Rqp5+BdLgIBJdTJht+yhYYNazXjt8zaFn8bfCNnFy2PuZfyPtyMjfZE4lkFxnhPzE5rr PKmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=oNAEuic8TN2JCwvO+MVhFf5QRjvhdSap6qMFsy8Im+g=; b=pRX38hiHw4B5hw8UrlPJlWwI9l0mf5xaJPQcq2TyMzZBaMZZqO6W2ly6G/yXsEFB+/ zsboF5U44Vk2qh0omZG1ELLwiL1SoHB/C+XBlXA5Xmg1j0T2/GwW8IP89+U9rDy6qxLw VPd6K/zr3Qu7ytN3ZTO8crmWIx4uZ2N4ABeT9IgIIcqZ63M2RQTRL//CoJzimEirOkCn pOdSR0Qr5W8T+8DyFxdzUOSYun3ZouTpMsCB6S1ew8gJAoHrDXVBBSGzgcHactlawTQ9 3iLXnOMC6LuuKCyLSgDopUIuspKI+RFboT5i1TOWNunt4yP+QcCWO7XZomeFNNHvXXnL 7Yuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ijcBVtI5; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j195si13122364pfd.165.2019.01.21.00.48.08; Mon, 21 Jan 2019 00:48:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ijcBVtI5; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729633AbfAUIsH (ORCPT + 15 others); 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-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 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(-) -- 2.17.1 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);