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 117DAC433F5 for ; Tue, 15 Feb 2022 06:31:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234447AbiBOGbf (ORCPT ); Tue, 15 Feb 2022 01:31:35 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:43608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232922AbiBOGbd (ORCPT ); Tue, 15 Feb 2022 01:31:33 -0500 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA20411EF05; Mon, 14 Feb 2022 22:31:22 -0800 (PST) X-UUID: ab763ec251604587ab6d41b6bd758adc-20220215 X-UUID: ab763ec251604587ab6d41b6bd758adc-20220215 Received: from mtkmbs10n2.mediatek.inc [(172.21.101.183)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1535810795; Tue, 15 Feb 2022 14:31:19 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 15 Feb 2022 14:31:18 +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:31:18 +0800 Message-ID: <48eabb5f312bf787eb89996eaa6e7c79f89fb037.camel@mediatek.com> Subject: Re: [PATCH v3 11/31] clk: mediatek: mux: 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:31:18 +0800 In-Reply-To: <20220208124034.414635-12-wenst@chromium.org> References: <20220208124034.414635-1-wenst@chromium.org> <20220208124034.414635-12-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-mux.c | 11 +++++++---- > drivers/clk/mediatek/clk-mux.h | 8 +++++++- > 2 files changed, 14 insertions(+), 5 deletions(-) > > diff --git a/drivers/clk/mediatek/clk-mux.c > b/drivers/clk/mediatek/clk-mux.c > index 2d4d8dc0120a..01af6a52711a 100644 > --- a/drivers/clk/mediatek/clk-mux.c > +++ b/drivers/clk/mediatek/clk-mux.c > @@ -4,13 +4,16 @@ > * Author: Owen Chen > */ > > -#include > -#include > -#include > +#include > +#include > +#include > +#include > #include > #include > +#include > +#include > +#include > > -#include "clk-mtk.h" > #include "clk-mux.h" > > struct mtk_clk_mux { > diff --git a/drivers/clk/mediatek/clk-mux.h > b/drivers/clk/mediatek/clk-mux.h > index 38a2b6014b08..903a3c937959 100644 > --- a/drivers/clk/mediatek/clk-mux.h > +++ b/drivers/clk/mediatek/clk-mux.h > @@ -7,7 +7,13 @@ > #ifndef __DRV_CLK_MTK_MUX_H > #define __DRV_CLK_MTK_MUX_H > > -#include > +#include > +#include > + > +struct clk; > +struct clk_onecell_data; > +struct clk_ops; > +struct device_node; > > struct mtk_mux { > int id;