From patchwork Tue Feb 23 20:30:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 386276 Delivered-To: patch@linaro.org Received: by 2002:a02:290e:0:0:0:0:0 with SMTP id p14csp2480449jap; Tue, 23 Feb 2021 12:32:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJzyFzjCoWmr0CGAtWmmJqI1lw8h31+41F+V2sF8Sknj5Lfu4t3PISogoCpCzdZf9IZ0DgUO X-Received: by 2002:a17:906:e19:: with SMTP id l25mr26349510eji.20.1614112347448; Tue, 23 Feb 2021 12:32:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614112347; cv=none; d=google.com; s=arc-20160816; b=ivdygGr8WDzowywFV+FY1+sSeK7Dh3+/sZfTcgKvc60BBCs0DruYENtHsdhn9VRb// T6vWtx3HtRy9WULJsFGhDV9HX2nCsS7iZ0UDSsaop348jLstUvTtrJELpKiuIebeX3Ko 9qewfmtlrn9u9OjITHJ/waJD/kyApBdIrXKOFFOfzTpgpl9s2JTCuyGXmncQaPOkTO7+ Neqn7iFA4ep2xGClcU0hm+SgzbMkUqkmy8eB9f0J9XPSSqkLJcWsMgEMQGsMqIoJLxAk ZOWqY7HqBjJXOgVTmGhMhuSCparJHjOwR2myiWfluitXdR5hDuLmainzsDJlKM46IleJ NICA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=yykpmPvGYDmTEhkUF8XP0zuCfszzUH4NGzXYhhdwA9I=; b=CIY9i+ziy9ofOxq4n2I7Ez/7jVL56mw3hqC0HMvRIOqhs9pPl9k65wQro0YyDxHvzy O/3u7ksPt/hsOpgVu9aKMnDy5Nrzlav6AHfsyn6boQoPHVczylS2IH/KMlCi/jDPnFKD N8h1yDjOOSdybhv+l4/aLvNahWgeAjjapH39T4WncvyVtVEbs3xucIzmVz+TR27dbxSU YxwsMPCrZzKgLwBzHWjG7B1O34GY1zHm+xlmaxaQUMfHo+FOX5138lnaJKSkD/h5zDKF GSRgFD/TCfNKr7rdoetID8BvsSe4GKLsAozTE51OPI6pRHyZiNtIgaeNKOpWLyNfcwSC CW4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wQ4+yPNf; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id v13si4716454edl.468.2021.02.23.12.32.27; Tue, 23 Feb 2021 12:32:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wQ4+yPNf; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 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 S233578AbhBWUbK (ORCPT + 7 others); Tue, 23 Feb 2021 15:31:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233449AbhBWUbG (ORCPT ); Tue, 23 Feb 2021 15:31:06 -0500 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0653BC06178A for ; Tue, 23 Feb 2021 12:30:25 -0800 (PST) Received: by mail-wm1-x32e.google.com with SMTP id v21so3656082wml.4 for ; Tue, 23 Feb 2021 12:30:25 -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; bh=yykpmPvGYDmTEhkUF8XP0zuCfszzUH4NGzXYhhdwA9I=; b=wQ4+yPNfoBfEttlZnKhap352YVy2WIBwq+kadAzNK8xCdpDe9dKrxlt44D7jfbnOXu 1TXVonEourvAu3NVkkpnowVh2oWgEY9PDj6RkmXrAyE3rf7e7rjZhrN0adysrWfNcKYs nGd+eSNBxgWVWdzARzSVImPz6NpgWA1579/0KdW/JXBdBIejZal1/sZLHcb4TwOe0KD6 cPVQtIGp4/CJXqIadwJIwTQEczN4FGYVVUOhKqfdhJ4i7VxG1J7N2WnRh/EQ0YVikDA1 Zp2aJYkF4m/EsdhX+htSxlYeZQTnTIx1caxSv7d15wQuy30iRqyfa8OFdE9MdEDc7WjC hhVw== 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; bh=yykpmPvGYDmTEhkUF8XP0zuCfszzUH4NGzXYhhdwA9I=; b=DMggmmAYFEmtWeNlKsRES82weqAMJ2g+Ux0k8zef016hoEM4pe4RnPi32EPZRmSTES eJ5dCfz8I4Ur/dc4izZRhJZ2LXZewmHfIN+vc7wVOZvli6y9xCX8AGCimNrt3VC/k2YI RjyhLasPaxICqNNn7PFIVgJwtK3Vpm5LIxqfor5pMAolVV8xAag1urUKBE60NvP64ghR QdSSXf3SGIQCxDM509dv0e5J+JtLLr2WYcdWX8hQJL+I02d9nbHvy1LQZxkalAd+odOj T7g75Y0C8VnZbvJscqwRCokMSZd7LnnlKUdMlla7ueslOgj6O/5B9lKlE0dwHuDlhJXh g9zA== X-Gm-Message-State: AOAM530yEKQXtEhlvxj7hYTadZfNm5hvwRBIOIxWmhFKEtrGdfLOi5Aa eJLl83ImBHxzJid/WdzpbkHD5A== X-Received: by 2002:a1c:7402:: with SMTP id p2mr452566wmc.43.1614112224419; Tue, 23 Feb 2021 12:30:24 -0800 (PST) Received: from localhost.localdomain (lns-bzn-59-82-252-157-252.adsl.proxad.net. [82.252.157.252]) by smtp.gmail.com with ESMTPSA id p3sm18288936wro.55.2021.02.23.12.30.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Feb 2021 12:30:24 -0800 (PST) From: Daniel Lezcano To: rafael@kernel.org Cc: MyungJoo Ham , Kyungmin Park , Chanwoo Choi , Christian Eggers , Jonathan Cameron , Lars-Peter Clausen , Peter Meerwald-Stadler , Zhang Rui , Amit Kucheria , linux-pm@vger.kernel.org (open list:DEVICE FREQUENCY (DEVFREQ)), linux-kernel@vger.kernel.org (open list), linux-iio@vger.kernel.org (open list:AMS AS73211 DRIVER) Subject: [PATCH 2/2] units: Use the HZ_PER_KHZ macro Date: Tue, 23 Feb 2021 21:30:02 +0100 Message-Id: <20210223203004.7219-2-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210223203004.7219-1-daniel.lezcano@linaro.org> References: <20210223203004.7219-1-daniel.lezcano@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org 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(-) -- 2.17.1 Reviewed-by: Christian Eggers Acked-by: Chanwoo Choi 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);