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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 30D9FC433FE for ; Tue, 15 Feb 2022 06:24:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234375AbiBOGYz (ORCPT ); Tue, 15 Feb 2022 01:24:55 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:39514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229676AbiBOGYy (ORCPT ); Tue, 15 Feb 2022 01:24:54 -0500 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DEC411E3C8; Mon, 14 Feb 2022 22:24:44 -0800 (PST) X-UUID: 217504d578144d1ca9d23814d7a6f3b9-20220215 X-UUID: 217504d578144d1ca9d23814d7a6f3b9-20220215 Received: from mtkcas11.mediatek.inc [(172.21.101.40)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1564925906; Tue, 15 Feb 2022 14:24:41 +0800 Received: from mtkexhb02.mediatek.inc (172.21.101.103) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 15 Feb 2022 14:24:40 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkexhb02.mediatek.inc (172.21.101.103) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 15 Feb 2022 14:24:40 +0800 Received: from mtksdccf07 (172.21.84.99) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 15 Feb 2022 14:24:39 +0800 Message-ID: <4b0f347eb09a156e848dc89174e0123b9a37b14d.camel@mediatek.com> Subject: Re: [PATCH v3 05/31] clk: mediatek: gate: Clean up included headers From: Chun-Jie Chen To: Chen-Yu Tsai , Stephen Boyd , Michael Turquette , Matthias Brugger CC: AngeloGioacchino Del Regno , Miles Chen , , , , Date: Tue, 15 Feb 2022 14:24:40 +0800 In-Reply-To: <20220208124034.414635-6-wenst@chromium.org> References: <20220208124034.414635-1-wenst@chromium.org> <20220208124034.414635-6-wenst@chromium.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2022-02-08 at 20:40 +0800, Chen-Yu Tsai 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. > > On the header side, replace headers that are included purely for data > structure definitions with forward declarations. This decreases the > amount of preprocessing and compilation effort required for each > inclusion. > > Signed-off-by: Chen-Yu Tsai > Reviewed-by: Miles Chen > Reviewed-by: AngeloGioacchino Del Regno < > angelogioacchino.delregno@collabora.com> Reviewed-by: Chun-Jie Chen > --- > drivers/clk/mediatek/clk-gate.c | 11 +++-------- > drivers/clk/mediatek/clk-gate.h | 10 +++++++--- > 2 files changed, 10 insertions(+), 11 deletions(-) > > diff --git a/drivers/clk/mediatek/clk-gate.c > b/drivers/clk/mediatek/clk-gate.c > index ed1ad5535d41..e8881ae1489a 100644 > --- a/drivers/clk/mediatek/clk-gate.c > +++ b/drivers/clk/mediatek/clk-gate.c > @@ -4,18 +4,13 @@ > * Author: James Liao > */ > > -#include > -#include > - > -#include > -#include > -#include > -#include > #include > -#include > #include > #include > +#include > #include > +#include > +#include > > #include "clk-gate.h" > > diff --git a/drivers/clk/mediatek/clk-gate.h > b/drivers/clk/mediatek/clk-gate.h > index 344adffb6578..6b5738826a22 100644 > --- a/drivers/clk/mediatek/clk-gate.h > +++ b/drivers/clk/mediatek/clk-gate.h > @@ -7,9 +7,13 @@ > #ifndef __DRV_CLK_GATE_H > #define __DRV_CLK_GATE_H > > -#include > -#include > -#include > +#include > + > +struct clk; > +struct clk_onecell_data; > +struct clk_ops; > +struct device; > +struct device_node; > > extern const struct clk_ops mtk_clk_gate_ops_setclr; > extern const struct clk_ops mtk_clk_gate_ops_setclr_inv;