Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2697855pxb; Tue, 23 Feb 2021 13:19:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJysNvdITJ5yuDgB5xCaTtevHf+Skp03Cck3UpzvPfqrqXMJMrKdZV3AaTQsTHhA3aUf0sXJ X-Received: by 2002:a17:907:5088:: with SMTP id fv8mr17015458ejc.9.1614115152107; Tue, 23 Feb 2021 13:19:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614115152; cv=none; d=google.com; s=arc-20160816; b=e2pK53m6FZKZ4ZLkbFdKdau22MpOh5pPEFSRcbVdPgnrMXC4ioKjEP8kDejn6fvL6l sCYsQQ7/gu3gYr0k5LrIrQmG6H6ulLlYCVoSAxXYdGugHt5RBkD8vi+cZipfQNZ5BlJq MmR2hi1Y9aaWHmmAKVkgW+m0nJdd+9zbvlvPlwPeXer49AMWE9KCMXRF5+22xQzXl8X7 MaOymRbuDCz7H5JsveI+YFUQM7gMVXJc9wDPQ8f5QhoWXdxrr+jih0Fp7Jhg5ljkGLGH SoihCZ3jBgcXkInmutuIu4+NeVBrX5Be8/gDGIsHnFkMnNUy8v+7DMIIzGEZ6pbNpBAG +vNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:organization:message-id:date:subject:cc:to :from; bh=LSKoUxXrf/Ia7Jhou6Etx530EWobUEOkFojImw1cxyI=; b=OwY0nwQPbHHh5Dn7tn5SZYTn/EGIQzYx3vxWsxnRfLCEDroVBX7BP2XDF3wF5vxupG 9G3OKIZia1rE6qbCTD2hcMUqjT1XBZxy35+J5aEPw5HusXEPALltY48OfAycV1Hjns85 libv8LxIxP7XjLANWXiyqoYJOqcXhqUfZpZcOVyEZcSVrCJNvp2iqJFo3WnHVAblInnH H44E5fdCF18fEFkvTKJK/qlD3kZxnBAnmUHrVU3CVQ5Ep+1pC4dn+EgyK9rMz8wA77J2 RQyvlkuUX9LqEkEz+DwBaZjUBjUJbLWRuAiWFixKkXzIFB4Z1xhFF/8FAtxk+4mtzvzS GcyQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g17si2819574edb.526.2021.02.23.13.18.45; Tue, 23 Feb 2021 13:19:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234365AbhBWVI2 (ORCPT + 99 others); Tue, 23 Feb 2021 16:08:28 -0500 Received: from mailout03.rmx.de ([94.199.88.101]:37253 "EHLO mailout03.rmx.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230083AbhBWVIT (ORCPT ); Tue, 23 Feb 2021 16:08:19 -0500 X-Greylist: delayed 1863 seconds by postgrey-1.27 at vger.kernel.org; Tue, 23 Feb 2021 16:08:16 EST Received: from kdin02.retarus.com (kdin02.dmz1.retloc [172.19.17.49]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mailout03.rmx.de (Postfix) with ESMTPS id 4DlW6k5R8Pzldby; Tue, 23 Feb 2021 21:36:30 +0100 (CET) Received: from mta.arri.de (unknown [217.111.95.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by kdin02.retarus.com (Postfix) with ESMTPS id 4DlW6d5zqMz2TTJJ; Tue, 23 Feb 2021 21:36:25 +0100 (CET) Received: from n95hx1g2.localnet (192.168.54.49) by mta.arri.de (192.168.100.104) with Microsoft SMTP Server (TLS) id 14.3.487.0; Tue, 23 Feb 2021 21:36:07 +0100 From: Christian Eggers To: , Daniel Lezcano CC: MyungJoo Ham , Kyungmin Park , Chanwoo Choi , "Jonathan Cameron" , Lars-Peter Clausen , "Peter Meerwald-Stadler" , Zhang Rui , "Amit Kucheria" , "open list:DEVICE FREQUENCY (DEVFREQ)" , open list , "open list:AMS AS73211 DRIVER" Subject: Re: [PATCH 2/2] units: Use the HZ_PER_KHZ macro Date: Tue, 23 Feb 2021 21:36:05 +0100 Message-ID: <2578027.mvXUDI8C0e@n95hx1g2> Organization: Arnold & Richter Cine Technik GmbH & Co. Betriebs KG In-Reply-To: <20210223203004.7219-2-daniel.lezcano@linaro.org> References: <20210223203004.7219-1-daniel.lezcano@linaro.org> <20210223203004.7219-2-daniel.lezcano@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Originating-IP: [192.168.54.49] X-RMX-ID: 20210223-213625-NLCNxGMyXFbP-0@out02.hq X-RMX-SOURCE: 217.111.95.66 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday, 23 February 2021, 21:30:02 CET, Daniel Lezcano wrote: > The HZ_PER_KHZ macro definition is duplicated in different subsystems. > > The macro now exists in include/linux/units.h, make use of it and > remove all the duplicated ones. > > Signed-off-by: Daniel Lezcano > --- > drivers/devfreq/devfreq.c | 2 +- > drivers/iio/light/as73211.c | 3 +-- > drivers/thermal/devfreq_cooling.c | 2 +- > 3 files changed, 3 insertions(+), 4 deletions(-) > > diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c > index 6aa10de792b3..4c636c336ace 100644 > --- a/drivers/devfreq/devfreq.c > +++ b/drivers/devfreq/devfreq.c > @@ -26,6 +26,7 @@ > #include > #include > #include > +#include > #include "governor.h" > > #define CREATE_TRACE_POINTS > @@ -33,7 +34,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; > diff --git a/drivers/iio/light/as73211.c b/drivers/iio/light/as73211.c > index 7b32dfaee9b3..3ba2378df3dd 100644 > --- a/drivers/iio/light/as73211.c > +++ b/drivers/iio/light/as73211.c > @@ -24,8 +24,7 @@ > #include > #include > #include > - > -#define HZ_PER_KHZ 1000 > +#include > > #define AS73211_DRV_NAME "as73211" > > diff --git a/drivers/thermal/devfreq_cooling.c b/drivers/thermal/devfreq_cooling.c > index fed3121ff2a1..fa5b8b0c7604 100644 > --- a/drivers/thermal/devfreq_cooling.c > +++ b/drivers/thermal/devfreq_cooling.c > @@ -19,10 +19,10 @@ > #include > #include > #include > +#include > > #include > > -#define HZ_PER_KHZ 1000 > #define SCALE_ERROR_MITIGATION 100 > > static DEFINE_IDA(devfreq_ida); > Reviewed-by: Christian Eggers