Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5982451imu; Mon, 21 Jan 2019 00:50:05 -0800 (PST) X-Google-Smtp-Source: ALg8bN6aM6gs1QrJpGxlqwKLJw+8uD6M1rzPLs3YUuu53tVvNaPSs9VN5Z4EVdgZyx/8t7eeEPJg X-Received: by 2002:a17:902:541:: with SMTP id 59mr29802344plf.88.1548060605911; Mon, 21 Jan 2019 00:50:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548060605; cv=none; d=google.com; s=arc-20160816; b=ZqGr0jyo1KuY76+MBdwmqhMg3hJbQ/DCmFj6VPjv9x6bGhGiwKGU3wMR4sCVTJNpT3 HNlsU9JWno37vT1+yZGZvtjsPOK9FgNU7s96r8tg/D5zMt+qdOxJF2VMkJOdupB32Udq JpEBBJp00nDNaukQP2w88L7xuT3WtJ3OGa7hMktysqdtRgWsSLCsCKcZC6WVzEA2AW06 32FwTBU0RFOyEXmVpbWAphUV2iM6hJeye8G+lw+QCv0P5V7DEF6GSRmuG5j01MtxiKHW Z5UAYggLNREMuIPXYYDNr0DV/JD6sWCdBFsIZu+GQ1IhkJZHxu/MoW1d/9HNKlQRs4Zt O9LQ== 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=X20Jdo8u9YTaGWu49B+FoR8SqidrfIG34ybFJL33ZlFXSlsRerDD1DctdqXZO7BGDM GpP9FRynRvhr3H15TfC4Es3Ztk581IT0FL9Spe9w6FpNKSCD8zh/qiLne6k+9fpqn15L FjZ+5xmInKzGilII6ljfCxwSgjXRKsvmuaXnqX1OdjhPV7D1X/eYxnIfQpiKL7KDF+IN /cRlfcJPv1UBQuq/8q66Cx+o+LR3SXrb//tJBZsEjaKKCelxhXlUk/ALfqL3r7FSgnLI DG4pyThjqbGgUs5oWIkhz+Q6dYc1D/SWuowU85XipJuwO5vZjy0QS18xglgeJCIcNCCt 8tSQ== 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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 w190si12590376pgd.338.2019.01.21.00.49.50; Mon, 21 Jan 2019 00:50:05 -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; dkim=pass header.i=@linaro.org header.s=google header.b=ijcBVtI5; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729724AbfAUIsI (ORCPT + 99 others); Mon, 21 Jan 2019 03:48:08 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:35658 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729360AbfAUIsH (ORCPT ); Mon, 21 Jan 2019 03:48:07 -0500 Received: by mail-wm1-f67.google.com with SMTP id t200so9939143wmt.0 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=euKNfYCdXNaY5O+/lYYA577tK7BtJDFq4uATh6Zf0/CIbl63o5pN6IP0mqHwJ4a9oU 2u1IlcKJxX5wQ2d9onl74Qwi94ujT/4WIkkt+mIJEucPfvTumMHiyjf6OU5osrJWmAkK /bx7teLL/Ey7K7aSpdSMAmYmVFkuC4qly+GPn5OLSuirxKazKLYhEG60Py2a0b6NA4sO b1Wo8JVs8qkzSp8KXXNG7T+qvQOUXke3Sf8P6Aew2R4ttyR9brhIO4rrn59OlhFg65O8 GU7HWfxpxdPuHp9kte5avlvheUK8kFnFWp0aD8pxrGn2EMoN66raXiqNRb1oXtU71hRF g47g== X-Gm-Message-State: AJcUukfTPDAQihLH12uVDgQDeVu/IrOjzXMlG9cEkJut5AWjPTkbFjdp gJpngzOnQ44a0IKMtoLdSQWf6RVaLLU= 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(-) 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); -- 2.17.1