Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1827382pxb; Wed, 2 Feb 2022 13:27:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJxBSYYBvPkDdJxKVRoWZUmVoFYWx6yGIfkQ1MADbgw7/QpJ3VR1XUMLlh7qvjmjtJjMfaw8 X-Received: by 2002:a65:62c4:: with SMTP id m4mr20206432pgv.344.1643837255603; Wed, 02 Feb 2022 13:27:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643837255; cv=none; d=google.com; s=arc-20160816; b=RK/pVHF+zYAEs0Os0+d2DOGgEIFlisLLEBufctAJjzh8ScRBNbjT3QECegNm9bHybE 1glcfzqjIIrdFnPxpeVhdbQhZN5ygJcGgUzs0Cles7+sm8vuP2uP+nFmutmF77OBS/hq DIHGxjEdCnAlTtoXJ+0o4hppLC56SOvh6/Jcbgpke0qtF6y3phw0DpUuU4tVdKuj6txS LKGbrGcK1H1eMuLTDbU+1fF1ZToJ1BycUvxxWAQ/OpkPQ6UopNOiLnXkb3mlogASfyLH /qCE9XgBKChWzmmiGrwk5Jtx3ksbmTDQQEslVKV2NweRp8gYvZQpZSRzxRNJltVCXYgK 3/Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=dU/z995NUTHrMzTqiAvkMkdF79WLwDMcbs55TIijfcE=; b=LLcJeRvVj1TZYSVYr9okX98hoW7imdlmZ7S+H0aeOQf4GDi3LZBEiCmYjFE1ZH341e 2wnq/0S2JwTZ7GHwZUlWPcsBs4sM7MrNsjH6DepXK9fTqr6no5GL81rIFvmz64IUOFND lhj9nTVTXlURKyD4zb5J2pZYSbchE6HctxCo9EqHf17FYDzd5H8RV5kUjuVjkCxAJ2l+ DVGJR94aTwJvjKMzGjf8gnsP/TooMRFx4KumOd4ihCvexVwQ8Y3aL0GS2NbQS1arqowR 2op7bqRJZpxqt6kND3RKFJnxw4/TTnIP1gtDN6mabW2R+vhXfscKjqjUzrrSK6M06c5b ex3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=fHDdFC5F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t70si14232688pgd.851.2022.02.02.13.27.23; Wed, 02 Feb 2022 13:27:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=fHDdFC5F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232341AbiBBM6V (ORCPT + 99 others); Wed, 2 Feb 2022 07:58:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229545AbiBBM6U (ORCPT ); Wed, 2 Feb 2022 07:58:20 -0500 Received: from mail-yb1-xb30.google.com (mail-yb1-xb30.google.com [IPv6:2607:f8b0:4864:20::b30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB4B5C061714 for ; Wed, 2 Feb 2022 04:58:19 -0800 (PST) Received: by mail-yb1-xb30.google.com with SMTP id i62so60635423ybg.5 for ; Wed, 02 Feb 2022 04:58:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=dU/z995NUTHrMzTqiAvkMkdF79WLwDMcbs55TIijfcE=; b=fHDdFC5FWRcThCd0Tfbp/dR2XIbwHtRs9H3VgjSuG/yWGDTofEDHUBZnWEJs5mh1uT Doh4KUlfwdcL923Pp48pI6OQf4MfQ1kFgpj5kywLiYCCot7ZS/7GM4UexJ8o91/sRPcr kyLnSvmRXg0QtssqbGSnERTChrpShqxV90zKo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dU/z995NUTHrMzTqiAvkMkdF79WLwDMcbs55TIijfcE=; b=F6xHVvjrMMqdK2L4H6J24XlJmCzZGPp6yDMuAzwQWB91oXWMSfM8aId4fYeD0TkrfQ ncN5Dik5d5MkeALlQ2Su/AsxBL4vhOgUPqQlzvzcMQj3cnlD1rbeb36uyAuBPn3KyZFt gggSWs822a77qBLeGgIBu1ymAWn90XExH6q6bDpB5d8PjLL1cIcK8KGNaRYKccwh8EuV A/K/s9ZtiMcCr0DT3XVb4y2+3WSehJgVSYphQHR5qCz7PRczmqGtroAID5wxNrvtuOVN IQJ7M1qV1mOsez0jokx0O7fbBQqsLILeHGuZT+25EtMnah3gA029MBOfTbdEeoiS7Owt fszA== X-Gm-Message-State: AOAM533CofBf5HKg00zy5TXIj+5sllteeW9RM31iYhFSitLF91P5JmP8 7JTb10ZzMNzyyctivBseOLM+UaQj3oTQjY/i369DSA== X-Received: by 2002:a81:1458:: with SMTP id 85mr937225ywu.199.1643806699120; Wed, 02 Feb 2022 04:58:19 -0800 (PST) MIME-Version: 1.0 References: <20220122091731.283592-15-wenst@chromium.org> <20220126063643.11544-1-miles.chen@mediatek.com> In-Reply-To: <20220126063643.11544-1-miles.chen@mediatek.com> From: Chen-Yu Tsai Date: Wed, 2 Feb 2022 20:58:08 +0800 Message-ID: Subject: Re: [PATCH 14/31] clk: mediatek: pll: Clean up included headers To: Miles Chen Cc: chun-jie.chen@mediatek.com, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, matthias.bgg@gmail.com, mturquette@baylibre.com, sboyd@kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 26, 2022 at 2:36 PM Miles Chen wrote: > > > 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? This seems like overkill. I'll define MHZ in the file instead. ChenYu > 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 > >