From patchwork Wed Sep 8 02:57:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12479963 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0908DC4332F for ; Wed, 8 Sep 2021 02:57:58 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B30B96113E for ; Wed, 8 Sep 2021 02:57:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B30B96113E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 4FE4794000E; Tue, 7 Sep 2021 22:57:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4D43F900003; Tue, 7 Sep 2021 22:57:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 34E2994000E; Tue, 7 Sep 2021 22:57:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0128.hostedemail.com [216.40.44.128]) by kanga.kvack.org (Postfix) with ESMTP id 2288C900003 for ; Tue, 7 Sep 2021 22:57:57 -0400 (EDT) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id E287531E52 for ; Wed, 8 Sep 2021 02:57:56 +0000 (UTC) X-FDA: 78562896552.01.CF77A15 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf06.hostedemail.com (Postfix) with ESMTP id 9FB13801A88D for ; Wed, 8 Sep 2021 02:57:56 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 417AD61131; Wed, 8 Sep 2021 02:57:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1631069875; bh=ptVdjAIFa+2n45Q7SGtjMOjqgBCCXE82efkG9KkMkuE=; h=Date:From:To:Subject:In-Reply-To:From; b=AzE+pRYODz7VtG4fIAwPfJ1j+h+agk+h1a6+2w8lH94N7yYBI36Qz+0e9s2if9UCQ dTL/OwQIgUqYIn2AdWv/8AY02VFlWmPZgyLUmShsRzgGemU9vjFa2AbpvBSJGEp1Zf QAzCns4Zwp8xfP21xh4mzjoYAphZuOir1K0nleK4= Date: Tue, 07 Sep 2021 19:57:54 -0700 From: Andrew Morton To: akpm@linux-foundation.org, andriy.shevchenko@linux.intel.com, ceggers@arri.de, cw00.choi@samsung.com, daniel.lezcano@linaro.org, jic23@kernel.org, Jonathan.Cameron@huawei.com, kyungmin.park@samsung.com, lars@metafoo.de, linux-mm@kvack.org, linux@roeck-us.net, lukasz.luba@arm.com, mcoquelin.stm32@gmail.com, miquel.raynal@bootlin.com, mm-commits@vger.kernel.org, myungjoo.ham@samsung.com, pmeerw@pmeerw.net, rafael@kernel.org, rui.zhang@intel.com, torvalds@linux-foundation.org Subject: [patch 087/147] devfreq: use HZ macros Message-ID: <20210908025754.e6JT4XfEK%akpm@linux-foundation.org> In-Reply-To: <20210907195226.14b1d22a07c085b22968b933@linux-foundation.org> User-Agent: s-nail v14.8.16 Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=AzE+pRYO; spf=pass (imf06.hostedemail.com: domain of akpm@linux-foundation.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Stat-Signature: zd638ur11q8iss37i8fuaxoeqdfwcne9 X-Rspamd-Queue-Id: 9FB13801A88D X-Rspamd-Server: rspam04 X-HE-Tag: 1631069876-846950 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Daniel Lezcano Subject: devfreq: use HZ macros HZ unit conversion macros are available in units.h, use them and remove the duplicate definition. The new macro has an unsigned long type. All the code is dealing with unsigned long and the code using the macro is doing a coercitive cast to unsigned long. Link: https://lkml.kernel.org/r/20210816114732.1834145-5-daniel.lezcano@linaro.org Signed-off-by: Daniel Lezcano Reviewed-by: Christian Eggers Reviewed-by: Andy Shevchenko Acked-by: Chanwoo Choi Cc: Guenter Roeck Cc: Jonathan Cameron Cc: Jonathan Cameron Cc: Kyungmin Park Cc: Lars-Peter Clausen Cc: Lukasz Luba Cc: Maxime Coquelin Cc: Miquel Raynal Cc: MyungJoo Ham Cc: Peter Meerwald Cc: "Rafael J. Wysocki" Cc: Zhang Rui Signed-off-by: Andrew Morton --- drivers/devfreq/devfreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/devfreq/devfreq.c~devfreq-use-hz-macros +++ a/drivers/devfreq/devfreq.c @@ -27,6 +27,7 @@ #include #include #include +#include #include "governor.h" #define CREATE_TRACE_POINTS @@ -34,7 +35,6 @@ #define IS_SUPPORTED_FLAG(f, name) ((f & DEVFREQ_GOV_FLAG_##name) ? true : false) #define IS_SUPPORTED_ATTR(f, name) ((f & DEVFREQ_GOV_ATTR_##name) ? true : false) -#define HZ_PER_KHZ 1000 static struct class *devfreq_class; static struct dentry *devfreq_debugfs;