From patchwork Mon Jan 14 16:34:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 155553 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3858590jaa; Mon, 14 Jan 2019 08:37:10 -0800 (PST) X-Google-Smtp-Source: ALg8bN6dLlmogc7+iFOS9VB3L29pg7JJg/u609XkVmd0XIKEWng6oCVZQHp+CSUsFVbOsKpeseI8 X-Received: by 2002:a62:16d6:: with SMTP id 205mr26055188pfw.256.1547483830347; Mon, 14 Jan 2019 08:37:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547483830; cv=none; d=google.com; s=arc-20160816; b=D1N4Zs1difXMgAbGyH+aLaOWi4U1Vc6kbZ9lEmpDUrK1/JhTo/N/ppQxhGiP2KQ7Kf hptS8Etu4o1veVc3qjZB05dcvPBpTeHEwHO/zkLaz4uHSb6sLwmdZp+oBtpTCZq+LMk3 +PkqO3rt7J2YE5GsXC3xbkOrtx7XWOpzbxID7zAYT4UgGGecwIgeGz++NTYjFIued3hu Vv7k8fnZcUa7L6Dw4rK9ITUvSlWVM1/Eu9I5Tb1J9K0fyVxQgHimUDShpWsAuEndIL4o qkvCIlQCX9X4FZj5VVvydPWs3aIqluFrAAlzcD9f9B7QfhlcMvM6Q4fHnJXyOGDsBSsb /mXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=l9DFr+fvRp4XNuqC48f1qHOGOAXrzlsaBjEr2TKjUhQ=; b=Tyf3GLzefUN25aUJynKAjrfi3OBHroUiULdYoe/4GkjB7LhnLKs6ZUJ5I30nyDcUTJ tXQU6sJWt+Uy2tNaoL0pWnr1c+Jt9M/zT+03kvWfIqWvF28eWOzbVaNWYOcAlqDZa95Q x9Z+FJxRqQ0RaI1sKsNykGVIkY/K5zhou3G4AMr6IhseP4E0OorVnlIiQCFnieAtKeSx tI089vS52HOAdO0I/l9RqBnaS+XXctFCXwOvYN2fDbMLCKCASSwqnaTPCPKYjiHrchhO QUtZYVK9aoq/TXxTwtDDUabOTIhaARrH8sOUmMcUbBZgKg4dw++k7uNWDZwfxDgxVxfk 2z3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YGUVocul; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 az11si683520plb.386.2019.01.14.08.37.10; Mon, 14 Jan 2019 08:37:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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=YGUVocul; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S1726678AbfANQhJ (ORCPT + 11 others); Mon, 14 Jan 2019 11:37:09 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:52503 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726696AbfANQhJ (ORCPT ); Mon, 14 Jan 2019 11:37:09 -0500 Received: by mail-wm1-f68.google.com with SMTP id m1so223289wml.2 for ; Mon, 14 Jan 2019 08:37:07 -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:in-reply-to:references :in-reply-to:references; bh=l9DFr+fvRp4XNuqC48f1qHOGOAXrzlsaBjEr2TKjUhQ=; b=YGUVoculVhQysuFRCsbNQIiuVYcvjY66Xe4LX7+xPF4IZ0rwm+fSRC1vVJOXzj2Uvb f+U8eciraYxPS23uQq3cV+ESE8UN/YkgMGzPPe2JLu+IVaU3VADFmzv8VnRv2LsO3G52 JdjSynt3qW7rv7JphYeUlgzo3OwuufWD8DXdc= 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:in-reply-to :references:in-reply-to:references; bh=l9DFr+fvRp4XNuqC48f1qHOGOAXrzlsaBjEr2TKjUhQ=; b=fsjXBdbKD6haFqwbx8NflOgf8OSZxDvOBojJILJBRLq16Tr846sg9awUg1tP/WLeiE qN9QQVerMjikMLb9IxzWa796fsZt1M1f+3amw0H6gvMgCZWsXdmm/NxMduI3h9TsgA6Q r3awMWogWyVYQ9PtVP3wmOZka5HF9vurvMNUneD8BpP2UIjY0HCoc7cwcxkrJIcPTIG2 wiyyDaHzYSZ6Q2s+omMsrH/acG72mOD1U51GhYmk1YCfZee7z5ScF054ZP76j/Zddjpn r/pEBOY5cBUzqCVvVIyefi3TutFI0rvbeTGd7d4PadbdpyB4ZXZQMDMo8Qv/GX82galH NyiA== X-Gm-Message-State: AJcUukdjZfWM8Ut2pN1hXJN/tk4tFwCMeP7F0XfqJOWOQt8QkZ9EeWHi iD1oGfaOywduGBipDHyuTXmO+w== X-Received: by 2002:a1c:400b:: with SMTP id n11mr12940185wma.85.1547483826284; Mon, 14 Jan 2019 08:37:06 -0800 (PST) Received: from localhost ([49.248.190.171]) by smtp.gmail.com with ESMTPSA id h16sm152392640wrb.62.2019.01.14.08.37.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Jan 2019 08:37:05 -0800 (PST) From: Amit Kucheria To: linux-kernel@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org, viresh.kumar@linaro.org, edubezval@gmail.com, swboyd@chromium.org, dianders@chromium.org, mka@chromium.org, "Rafael J. Wysocki" , linux-pm@vger.kernel.org Subject: [PATCH v1 03/10] cpufreq: Replace open-coded << with BIT() Date: Mon, 14 Jan 2019 22:04:55 +0530 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@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 --- include/linux/cpufreq.h | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) -- 2.17.1 Reviewed-by: Stephen Boyd diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 70ad02088825..ea303dfd5f05 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -351,14 +351,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. @@ -366,14 +367,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 @@ -382,19 +383,19 @@ 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) /* * Set by drivers that want the core to automatically register the cpufreq * driver as a thermal cooling device */ -#define CPUFREQ_AUTO_REGISTER_COOLING_DEV (1 << 7) +#define CPUFREQ_AUTO_REGISTER_COOLING_DEV BIT(7) int cpufreq_register_driver(struct cpufreq_driver *driver_data); int cpufreq_unregister_driver(struct cpufreq_driver *driver_data);