From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A7F6DC28CF5 for ; Wed, 26 Jan 2022 06:38:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8fJcJNKOgJXkzN4JFIkxc6Cvoq22A+U/PIbTHn+PA2M=; b=0YLB0MEU4h0bX/ LBfutRwIuIdImn1Lzfmr9k1FsxzppBsCsPaGNFGskou70510js1NbgCy0gurZZ3tLPTzCQSO/VtV4 i3++n/qDehintI8Hg91bzx8lYakx+8tl/SrTUk0tSd65Cti6Nt48Kvff1LnMCSrbdNvwUsj9llrRq Y6t8mhgmd073096cMIGP580GfS/RtRz0bgIIDAD0fA55NI7W6CfBUN6rzwPc6B8tU/zCwqJZRVrN7 gLRogcFbUI53uBr3HsZLMS54+YNaXxk8zx4qhvKDCXG5AVeC7EyX+iN/uarUmHlPs7Pz4jEQBnWc8 D9n4Erz1uz3z7ezNbcrg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCbvy-00AIt2-8w; Wed, 26 Jan 2022 06:37:34 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCbvt-00AIsT-El; Wed, 26 Jan 2022 06:37:31 +0000 X-UUID: 6bdf4e72a03b446892c760fada4e8690-20220125 X-UUID: 6bdf4e72a03b446892c760fada4e8690-20220125 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 570134819; Tue, 25 Jan 2022 23:37:28 -0700 Received: from mtkexhb01.mediatek.inc (172.21.101.102) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 25 Jan 2022 22:36:50 -0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkexhb01.mediatek.inc (172.21.101.102) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 26 Jan 2022 14:36:43 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 26 Jan 2022 14:36:43 +0800 From: Miles Chen To: CC: , , , , , , , Subject: Re: [PATCH 14/31] clk: mediatek: pll: Clean up included headers Date: Wed, 26 Jan 2022 14:36:43 +0800 Message-ID: <20220126063643.11544-1-miles.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20220122091731.283592-15-wenst@chromium.org> References: <20220122091731.283592-15-wenst@chromium.org> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220125_223729_528180_49E79BB4 X-CRM114-Status: GOOD ( 18.90 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org > Some included headers aren't actually used anywhere, while other headers > with the declaration of functions and structures aren't directly > included. > > Get rid of the unused ones, and add the ones that should be included > directly. > > Also, expand the MHZ macro with spelled-out "1000 * 1000" to be able > to not include clk-mtk.h. The existing ternary operator is rewritten > in a shortened form to accommodate the expanded macro. I think MHZ is more human readable than 1000*1000, like SZ_4K in linux/sizes.h. MHZ is also use by other clk-mtxxxx.c (by including clk-mtk.h) , so maybe we should keep clk-mtk.h? Miles > > Signed-off-by: Chen-Yu Tsai > --- > drivers/clk/mediatek/clk-pll.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/clk/mediatek/clk-pll.c b/drivers/clk/mediatek/clk-pll.c > index 081e0df8203e..9698d1c97cd6 100644 > --- a/drivers/clk/mediatek/clk-pll.c > +++ b/drivers/clk/mediatek/clk-pll.c > @@ -4,15 +4,15 @@ > * Author: James Liao > */ > > -#include > -#include > +#include > +#include > +#include > +#include > #include > #include > +#include > #include > -#include > -#include > > -#include "clk-mtk.h" > #include "clk-pll.h" > > #define REG_CON0 0 > @@ -162,7 +162,7 @@ static void mtk_pll_set_rate_regs(struct mtk_clk_pll *pll, u32 pcw, > static void mtk_pll_calc_values(struct mtk_clk_pll *pll, u32 *pcw, u32 *postdiv, > u32 freq, u32 fin) > { > - unsigned long fmin = pll->data->fmin ? pll->data->fmin : (1000 * MHZ); > + unsigned long fmin = pll->data->fmin ?: (1000 * 1000 * 1000); > const struct mtk_pll_div_table *div_table = pll->data->div_table; > u64 _pcw; > int ibits; > -- > 2.35.0.rc0.227.g00780c9af4-goog _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel