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 437CFC433EF for ; Thu, 6 Jan 2022 08:38:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236760AbiAFIij (ORCPT ); Thu, 6 Jan 2022 03:38:39 -0500 Received: from mailgw01.mediatek.com ([60.244.123.138]:51946 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S236650AbiAFIig (ORCPT ); Thu, 6 Jan 2022 03:38:36 -0500 X-UUID: defbefcfb5d74b27b84f2dc6dd8a30f8-20220106 X-UUID: defbefcfb5d74b27b84f2dc6dd8a30f8-20220106 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 940994645; Thu, 06 Jan 2022 16:38:34 +0800 Received: from mtkexhb02.mediatek.inc (172.21.101.103) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.3; Thu, 6 Jan 2022 16:38:33 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkexhb02.mediatek.inc (172.21.101.103) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 6 Jan 2022 16:38:33 +0800 Received: from mhfsdcap04 (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 6 Jan 2022 16:38:32 +0800 Message-ID: <509b82079256ffaa0d844ae5a79a436fced16f3f.camel@mediatek.com> Subject: Re: [PATCH 2/3] phy: mediatek: phy-mtk-mipi-dsi: Reorder and stop implicit header inclusion From: Chunfeng Yun To: AngeloGioacchino Del Regno , CC: , , , , , , , , Date: Thu, 6 Jan 2022 16:38:32 +0800 In-Reply-To: <20220103145324.48008-2-angelogioacchino.delregno@collabora.com> References: <20220103145324.48008-1-angelogioacchino.delregno@collabora.com> <20220103145324.48008-2-angelogioacchino.delregno@collabora.com> 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 Mon, 2022-01-03 at 15:53 +0100, AngeloGioacchino Del Regno wrote: > All the headers for phy-mtk-mipi-{dsi,dsi-mt8173,dsi-mt8183}.c were > included from phy-mtk-mipi-dsi.h, but this isn't optimal: in order to > increase readability and sensibly reduce build times, the inclusions > should be done per-file, also avoiding to include unused headers and > should not be implicit. > > For this reason, move the inclusions to each file and remove unused > ones. > > Signed-off-by: AngeloGioacchino Del Regno < > angelogioacchino.delregno@collabora.com> > --- > drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8173.c | 4 ++++ > drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8183.c | 4 ++++ > drivers/phy/mediatek/phy-mtk-mipi-dsi.c | 7 +++++++ > drivers/phy/mediatek/phy-mtk-mipi-dsi.h | 10 ++-------- > 4 files changed, 17 insertions(+), 8 deletions(-) > > diff --git a/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8173.c > b/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8173.c > index 95a0d9a3cca7..59f028da9d3e 100644 > --- a/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8173.c > +++ b/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8173.c > @@ -4,7 +4,11 @@ > * Author: jitao.shi > */ > > +#include > +#include > +#include > #include > +#include > #include "phy-mtk-mipi-dsi.h" > > #define MIPITX_DSI_CON 0x00 > diff --git a/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8183.c > b/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8183.c > index 01b59527669e..6c6b192485ba 100644 > --- a/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8183.c > +++ b/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8183.c > @@ -4,7 +4,11 @@ > * Author: jitao.shi > */ > > +#include > +#include > +#include > #include > +#include > #include "phy-mtk-mipi-dsi.h" > > #define MIPITX_LANE_CON 0x000c > diff --git a/drivers/phy/mediatek/phy-mtk-mipi-dsi.c > b/drivers/phy/mediatek/phy-mtk-mipi-dsi.c > index 51b1b1d4ad38..6f7425b0bf5b 100644 > --- a/drivers/phy/mediatek/phy-mtk-mipi-dsi.c > +++ b/drivers/phy/mediatek/phy-mtk-mipi-dsi.c > @@ -3,7 +3,14 @@ > * Copyright (c) 2015 MediaTek Inc. > */ > > +#include > +#include > +#include > +#include > +#include > +#include > #include > +#include > #include "phy-mtk-mipi-dsi.h" > > inline struct mtk_mipi_tx *mtk_mipi_tx_from_clk_hw(struct clk_hw > *hw) > diff --git a/drivers/phy/mediatek/phy-mtk-mipi-dsi.h > b/drivers/phy/mediatek/phy-mtk-mipi-dsi.h > index 8d32e9027a15..4eb5fc91e083 100644 > --- a/drivers/phy/mediatek/phy-mtk-mipi-dsi.h > +++ b/drivers/phy/mediatek/phy-mtk-mipi-dsi.h > @@ -7,16 +7,10 @@ > #ifndef _MTK_MIPI_TX_H > #define _MTK_MIPI_TX_H > > -#include > #include > -#include > -#include > -#include > -#include > -#include > -#include > +#include > +#include > #include > -#include > I don't think it's good idea to move the common headers into .c files > struct mtk_mipitx_data { > const u32 mppll_preserve; 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 548F3C433F5 for ; Thu, 6 Jan 2022 08:38:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6963B113759; Thu, 6 Jan 2022 08:38:37 +0000 (UTC) Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by gabe.freedesktop.org (Postfix) with ESMTPS id A424011375B for ; Thu, 6 Jan 2022 08:38:36 +0000 (UTC) X-UUID: defbefcfb5d74b27b84f2dc6dd8a30f8-20220106 X-UUID: defbefcfb5d74b27b84f2dc6dd8a30f8-20220106 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 940994645; Thu, 06 Jan 2022 16:38:34 +0800 Received: from mtkexhb02.mediatek.inc (172.21.101.103) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.3; Thu, 6 Jan 2022 16:38:33 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkexhb02.mediatek.inc (172.21.101.103) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 6 Jan 2022 16:38:33 +0800 Received: from mhfsdcap04 (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 6 Jan 2022 16:38:32 +0800 Message-ID: <509b82079256ffaa0d844ae5a79a436fced16f3f.camel@mediatek.com> Subject: Re: [PATCH 2/3] phy: mediatek: phy-mtk-mipi-dsi: Reorder and stop implicit header inclusion From: Chunfeng Yun To: AngeloGioacchino Del Regno , Date: Thu, 6 Jan 2022 16:38:32 +0800 In-Reply-To: <20220103145324.48008-2-angelogioacchino.delregno@collabora.com> References: <20220103145324.48008-1-angelogioacchino.delregno@collabora.com> <20220103145324.48008-2-angelogioacchino.delregno@collabora.com> 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 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, kishon@ti.com, linux-phy@lists.infradead.org, vkoul@kernel.org, linux-mediatek@lists.infradead.org, matthias.bgg@gmail.com, linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Mon, 2022-01-03 at 15:53 +0100, AngeloGioacchino Del Regno wrote: > All the headers for phy-mtk-mipi-{dsi,dsi-mt8173,dsi-mt8183}.c were > included from phy-mtk-mipi-dsi.h, but this isn't optimal: in order to > increase readability and sensibly reduce build times, the inclusions > should be done per-file, also avoiding to include unused headers and > should not be implicit. > > For this reason, move the inclusions to each file and remove unused > ones. > > Signed-off-by: AngeloGioacchino Del Regno < > angelogioacchino.delregno@collabora.com> > --- > drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8173.c | 4 ++++ > drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8183.c | 4 ++++ > drivers/phy/mediatek/phy-mtk-mipi-dsi.c | 7 +++++++ > drivers/phy/mediatek/phy-mtk-mipi-dsi.h | 10 ++-------- > 4 files changed, 17 insertions(+), 8 deletions(-) > > diff --git a/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8173.c > b/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8173.c > index 95a0d9a3cca7..59f028da9d3e 100644 > --- a/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8173.c > +++ b/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8173.c > @@ -4,7 +4,11 @@ > * Author: jitao.shi > */ > > +#include > +#include > +#include > #include > +#include > #include "phy-mtk-mipi-dsi.h" > > #define MIPITX_DSI_CON 0x00 > diff --git a/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8183.c > b/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8183.c > index 01b59527669e..6c6b192485ba 100644 > --- a/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8183.c > +++ b/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8183.c > @@ -4,7 +4,11 @@ > * Author: jitao.shi > */ > > +#include > +#include > +#include > #include > +#include > #include "phy-mtk-mipi-dsi.h" > > #define MIPITX_LANE_CON 0x000c > diff --git a/drivers/phy/mediatek/phy-mtk-mipi-dsi.c > b/drivers/phy/mediatek/phy-mtk-mipi-dsi.c > index 51b1b1d4ad38..6f7425b0bf5b 100644 > --- a/drivers/phy/mediatek/phy-mtk-mipi-dsi.c > +++ b/drivers/phy/mediatek/phy-mtk-mipi-dsi.c > @@ -3,7 +3,14 @@ > * Copyright (c) 2015 MediaTek Inc. > */ > > +#include > +#include > +#include > +#include > +#include > +#include > #include > +#include > #include "phy-mtk-mipi-dsi.h" > > inline struct mtk_mipi_tx *mtk_mipi_tx_from_clk_hw(struct clk_hw > *hw) > diff --git a/drivers/phy/mediatek/phy-mtk-mipi-dsi.h > b/drivers/phy/mediatek/phy-mtk-mipi-dsi.h > index 8d32e9027a15..4eb5fc91e083 100644 > --- a/drivers/phy/mediatek/phy-mtk-mipi-dsi.h > +++ b/drivers/phy/mediatek/phy-mtk-mipi-dsi.h > @@ -7,16 +7,10 @@ > #ifndef _MTK_MIPI_TX_H > #define _MTK_MIPI_TX_H > > -#include > #include > -#include > -#include > -#include > -#include > -#include > -#include > +#include > +#include > #include > -#include > I don't think it's good idea to move the common headers into .c files > struct mtk_mipitx_data { > const u32 mppll_preserve; 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 8F91EC433EF for ; Thu, 6 Jan 2022 08:48:51 +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: Date:CC:To:From:Subject:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=wsSJoiPeljyTpkUU3VhZCMh2GNc2S2/h4veO/uXkXJE=; b=VLSQdF5HsmKUh0 9A0ffKT1DU+RtJRHF+uIBM4LLn28+QnjKKUMkVFRSZtor1Mbs44tuqbCSTD3LwlCkAZ4uSL4Ah/Of M4O+aeA/Lhs7SbJVvpztOd5muMqBVGkesqNCItsslJoYaqlKaJsMTsqoDQvoS/bn7BJDQ8hdqPLny RoOMWQzSwe3cl1GV0UwhttDasRchaXE+Tp9X7+H/mSeECLqKRnJLJJwuWoNQJ8Y63+bhVbBbY9kYQ NIUciDO/qX0qogKpI/i2ZhMqzG5pmKP0w6WoXvk33TgWCIAJwc3s7O3jLOVF9AcrA28qFGBFhZr4/ s50IcBmyqin1Q4USGh1A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n5ORv-00H7DJ-LF; Thu, 06 Jan 2022 08:48:43 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n5ORr-00H7C7-Ps; Thu, 06 Jan 2022 08:48:41 +0000 X-UUID: 5aef2650074d4d029da16bb365dea8e4-20220106 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=uB9XI7j4SB26amz3x7QKvwzxoWm0mOvg3a8f7hiIa5o=; b=kho4X7gxWwiWEERtXhKw0DfZLLr09J8izqqaEiAjiH8+bOtJgL2DGiSL5nID8ORQA85hGOvmGYNDnCu5+9/8y1EoHrsiiEfnWK7yxM8nKQMJ8Zjbj1/WvUqf/msWCq8jZ6KwHLywObZsbtlLTYgWWvw+EQjz0GlExK6wwahfcwQ=; X-UUID: 5aef2650074d4d029da16bb365dea8e4-20220106 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 597681819; Thu, 06 Jan 2022 01:48:37 -0700 Received: from mtkexhb02.mediatek.inc (172.21.101.103) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 6 Jan 2022 00:38:34 -0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkexhb02.mediatek.inc (172.21.101.103) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 6 Jan 2022 16:38:33 +0800 Received: from mhfsdcap04 (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 6 Jan 2022 16:38:32 +0800 Message-ID: <509b82079256ffaa0d844ae5a79a436fced16f3f.camel@mediatek.com> Subject: Re: [PATCH 2/3] phy: mediatek: phy-mtk-mipi-dsi: Reorder and stop implicit header inclusion From: Chunfeng Yun To: AngeloGioacchino Del Regno , CC: , , , , , , , , Date: Thu, 6 Jan 2022 16:38:32 +0800 In-Reply-To: <20220103145324.48008-2-angelogioacchino.delregno@collabora.com> References: <20220103145324.48008-1-angelogioacchino.delregno@collabora.com> <20220103145324.48008-2-angelogioacchino.delregno@collabora.com> X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220106_004839_872074_8FA27526 X-CRM114-Status: GOOD ( 16.84 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org On Mon, 2022-01-03 at 15:53 +0100, AngeloGioacchino Del Regno wrote: > All the headers for phy-mtk-mipi-{dsi,dsi-mt8173,dsi-mt8183}.c were > included from phy-mtk-mipi-dsi.h, but this isn't optimal: in order to > increase readability and sensibly reduce build times, the inclusions > should be done per-file, also avoiding to include unused headers and > should not be implicit. > > For this reason, move the inclusions to each file and remove unused > ones. > > Signed-off-by: AngeloGioacchino Del Regno < > angelogioacchino.delregno@collabora.com> > --- > drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8173.c | 4 ++++ > drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8183.c | 4 ++++ > drivers/phy/mediatek/phy-mtk-mipi-dsi.c | 7 +++++++ > drivers/phy/mediatek/phy-mtk-mipi-dsi.h | 10 ++-------- > 4 files changed, 17 insertions(+), 8 deletions(-) > > diff --git a/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8173.c > b/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8173.c > index 95a0d9a3cca7..59f028da9d3e 100644 > --- a/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8173.c > +++ b/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8173.c > @@ -4,7 +4,11 @@ > * Author: jitao.shi > */ > > +#include > +#include > +#include > #include > +#include > #include "phy-mtk-mipi-dsi.h" > > #define MIPITX_DSI_CON 0x00 > diff --git a/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8183.c > b/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8183.c > index 01b59527669e..6c6b192485ba 100644 > --- a/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8183.c > +++ b/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8183.c > @@ -4,7 +4,11 @@ > * Author: jitao.shi > */ > > +#include > +#include > +#include > #include > +#include > #include "phy-mtk-mipi-dsi.h" > > #define MIPITX_LANE_CON 0x000c > diff --git a/drivers/phy/mediatek/phy-mtk-mipi-dsi.c > b/drivers/phy/mediatek/phy-mtk-mipi-dsi.c > index 51b1b1d4ad38..6f7425b0bf5b 100644 > --- a/drivers/phy/mediatek/phy-mtk-mipi-dsi.c > +++ b/drivers/phy/mediatek/phy-mtk-mipi-dsi.c > @@ -3,7 +3,14 @@ > * Copyright (c) 2015 MediaTek Inc. > */ > > +#include > +#include > +#include > +#include > +#include > +#include > #include > +#include > #include "phy-mtk-mipi-dsi.h" > > inline struct mtk_mipi_tx *mtk_mipi_tx_from_clk_hw(struct clk_hw > *hw) > diff --git a/drivers/phy/mediatek/phy-mtk-mipi-dsi.h > b/drivers/phy/mediatek/phy-mtk-mipi-dsi.h > index 8d32e9027a15..4eb5fc91e083 100644 > --- a/drivers/phy/mediatek/phy-mtk-mipi-dsi.h > +++ b/drivers/phy/mediatek/phy-mtk-mipi-dsi.h > @@ -7,16 +7,10 @@ > #ifndef _MTK_MIPI_TX_H > #define _MTK_MIPI_TX_H > > -#include > #include > -#include > -#include > -#include > -#include > -#include > -#include > +#include > +#include > #include > -#include > I don't think it's good idea to move the common headers into .c files > struct mtk_mipitx_data { > const u32 mppll_preserve; _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek 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 EC8A4C433F5 for ; Thu, 6 Jan 2022 08:48:57 +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: Date:CC:To:From:Subject:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6H8pAskOTOdYAEiOCSTE46iYEYk/10VwwsWF3VoZiPE=; b=BFER+ynv6b7UXs PuHyenXs/d4TPtE94bSsAWWu51j4UnexKpPwKD7hIGUnq3U523jIBWTN/D0MO+oi2Wsw4rw/uokV2 AG9wfIX1NMzq/2FSIWlMrpyRlGcYArSOIbUA2/f1VuQ/BLRdkE6wFTd0wO8yW5TTnwkVXLokalrhR lU8QgpQiqwRTFUxr7gm1MuLTKYxaPGgbDdFJrAI8uot077aM7XBHIFIWSVd2DKc4p1Vrm0XkThNRQ NOhQNyQznAeFXAev5lK4ddIt7h/VpOX6EcEBLkVo6w1huRYmVIiaR5IV6RSmVlRNKjb4yn/un3iQO tKw0lZoidRImHakN91JQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n5OS9-00H7Ht-Dt; Thu, 06 Jan 2022 08:48:57 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n5ORr-00H7C7-Ps; Thu, 06 Jan 2022 08:48:41 +0000 X-UUID: 5aef2650074d4d029da16bb365dea8e4-20220106 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=uB9XI7j4SB26amz3x7QKvwzxoWm0mOvg3a8f7hiIa5o=; b=kho4X7gxWwiWEERtXhKw0DfZLLr09J8izqqaEiAjiH8+bOtJgL2DGiSL5nID8ORQA85hGOvmGYNDnCu5+9/8y1EoHrsiiEfnWK7yxM8nKQMJ8Zjbj1/WvUqf/msWCq8jZ6KwHLywObZsbtlLTYgWWvw+EQjz0GlExK6wwahfcwQ=; X-UUID: 5aef2650074d4d029da16bb365dea8e4-20220106 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 597681819; Thu, 06 Jan 2022 01:48:37 -0700 Received: from mtkexhb02.mediatek.inc (172.21.101.103) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 6 Jan 2022 00:38:34 -0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkexhb02.mediatek.inc (172.21.101.103) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 6 Jan 2022 16:38:33 +0800 Received: from mhfsdcap04 (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 6 Jan 2022 16:38:32 +0800 Message-ID: <509b82079256ffaa0d844ae5a79a436fced16f3f.camel@mediatek.com> Subject: Re: [PATCH 2/3] phy: mediatek: phy-mtk-mipi-dsi: Reorder and stop implicit header inclusion From: Chunfeng Yun To: AngeloGioacchino Del Regno , CC: , , , , , , , , Date: Thu, 6 Jan 2022 16:38:32 +0800 In-Reply-To: <20220103145324.48008-2-angelogioacchino.delregno@collabora.com> References: <20220103145324.48008-1-angelogioacchino.delregno@collabora.com> <20220103145324.48008-2-angelogioacchino.delregno@collabora.com> X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220106_004839_872074_8FA27526 X-CRM114-Status: GOOD ( 16.84 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org On Mon, 2022-01-03 at 15:53 +0100, AngeloGioacchino Del Regno wrote: > All the headers for phy-mtk-mipi-{dsi,dsi-mt8173,dsi-mt8183}.c were > included from phy-mtk-mipi-dsi.h, but this isn't optimal: in order to > increase readability and sensibly reduce build times, the inclusions > should be done per-file, also avoiding to include unused headers and > should not be implicit. > > For this reason, move the inclusions to each file and remove unused > ones. > > Signed-off-by: AngeloGioacchino Del Regno < > angelogioacchino.delregno@collabora.com> > --- > drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8173.c | 4 ++++ > drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8183.c | 4 ++++ > drivers/phy/mediatek/phy-mtk-mipi-dsi.c | 7 +++++++ > drivers/phy/mediatek/phy-mtk-mipi-dsi.h | 10 ++-------- > 4 files changed, 17 insertions(+), 8 deletions(-) > > diff --git a/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8173.c > b/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8173.c > index 95a0d9a3cca7..59f028da9d3e 100644 > --- a/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8173.c > +++ b/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8173.c > @@ -4,7 +4,11 @@ > * Author: jitao.shi > */ > > +#include > +#include > +#include > #include > +#include > #include "phy-mtk-mipi-dsi.h" > > #define MIPITX_DSI_CON 0x00 > diff --git a/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8183.c > b/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8183.c > index 01b59527669e..6c6b192485ba 100644 > --- a/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8183.c > +++ b/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8183.c > @@ -4,7 +4,11 @@ > * Author: jitao.shi > */ > > +#include > +#include > +#include > #include > +#include > #include "phy-mtk-mipi-dsi.h" > > #define MIPITX_LANE_CON 0x000c > diff --git a/drivers/phy/mediatek/phy-mtk-mipi-dsi.c > b/drivers/phy/mediatek/phy-mtk-mipi-dsi.c > index 51b1b1d4ad38..6f7425b0bf5b 100644 > --- a/drivers/phy/mediatek/phy-mtk-mipi-dsi.c > +++ b/drivers/phy/mediatek/phy-mtk-mipi-dsi.c > @@ -3,7 +3,14 @@ > * Copyright (c) 2015 MediaTek Inc. > */ > > +#include > +#include > +#include > +#include > +#include > +#include > #include > +#include > #include "phy-mtk-mipi-dsi.h" > > inline struct mtk_mipi_tx *mtk_mipi_tx_from_clk_hw(struct clk_hw > *hw) > diff --git a/drivers/phy/mediatek/phy-mtk-mipi-dsi.h > b/drivers/phy/mediatek/phy-mtk-mipi-dsi.h > index 8d32e9027a15..4eb5fc91e083 100644 > --- a/drivers/phy/mediatek/phy-mtk-mipi-dsi.h > +++ b/drivers/phy/mediatek/phy-mtk-mipi-dsi.h > @@ -7,16 +7,10 @@ > #ifndef _MTK_MIPI_TX_H > #define _MTK_MIPI_TX_H > > -#include > #include > -#include > -#include > -#include > -#include > -#include > -#include > +#include > +#include > #include > -#include > I don't think it's good idea to move the common headers into .c files > struct mtk_mipitx_data { > const u32 mppll_preserve; -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy 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 55EEFC433EF for ; Thu, 6 Jan 2022 08:50:34 +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: Date:CC:To:From:Subject:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7NBnd6pQ6MxXE7OPeMWHvVQzXU3n9UXdiwySnU9VVmk=; b=3ioWo0BsmWB14s nBsloAkw1Lhiyvn2BxxnX19K0MUVojcbpfoEiNa0tMXB8L2wEIcNKLq71vDRXBTyq4oRLiYWihwRt KJJ57nkNF4Q1IdVmsTdVFaTIhztojaGB2wgeNXjcnl6PQhxmUe6YAEdKnkxR7SF3mfhKtYRdiByX5 /b1kRd7RGhjC/4qaQHSaF7853xXrUi7xZ45l9I4H/4TV61+iDemk5vtsq4ZHwvIEUWaQ94ge5/nTo gRosp3sqSgyzPDA5oiYep50lCwpmzL3m86SSEEwSYgfWLjHww40mZyxhTdYiSP+WhKjjms1rsooFH vj0Rp/ThVGhgDOyuzfww==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n5ORz-00H7Dd-8i; Thu, 06 Jan 2022 08:48:47 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n5ORr-00H7C7-Ps; Thu, 06 Jan 2022 08:48:41 +0000 X-UUID: 5aef2650074d4d029da16bb365dea8e4-20220106 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=uB9XI7j4SB26amz3x7QKvwzxoWm0mOvg3a8f7hiIa5o=; b=kho4X7gxWwiWEERtXhKw0DfZLLr09J8izqqaEiAjiH8+bOtJgL2DGiSL5nID8ORQA85hGOvmGYNDnCu5+9/8y1EoHrsiiEfnWK7yxM8nKQMJ8Zjbj1/WvUqf/msWCq8jZ6KwHLywObZsbtlLTYgWWvw+EQjz0GlExK6wwahfcwQ=; X-UUID: 5aef2650074d4d029da16bb365dea8e4-20220106 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 597681819; Thu, 06 Jan 2022 01:48:37 -0700 Received: from mtkexhb02.mediatek.inc (172.21.101.103) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 6 Jan 2022 00:38:34 -0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkexhb02.mediatek.inc (172.21.101.103) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 6 Jan 2022 16:38:33 +0800 Received: from mhfsdcap04 (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 6 Jan 2022 16:38:32 +0800 Message-ID: <509b82079256ffaa0d844ae5a79a436fced16f3f.camel@mediatek.com> Subject: Re: [PATCH 2/3] phy: mediatek: phy-mtk-mipi-dsi: Reorder and stop implicit header inclusion From: Chunfeng Yun To: AngeloGioacchino Del Regno , CC: , , , , , , , , Date: Thu, 6 Jan 2022 16:38:32 +0800 In-Reply-To: <20220103145324.48008-2-angelogioacchino.delregno@collabora.com> References: <20220103145324.48008-1-angelogioacchino.delregno@collabora.com> <20220103145324.48008-2-angelogioacchino.delregno@collabora.com> X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220106_004839_872074_8FA27526 X-CRM114-Status: GOOD ( 16.84 ) 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 On Mon, 2022-01-03 at 15:53 +0100, AngeloGioacchino Del Regno wrote: > All the headers for phy-mtk-mipi-{dsi,dsi-mt8173,dsi-mt8183}.c were > included from phy-mtk-mipi-dsi.h, but this isn't optimal: in order to > increase readability and sensibly reduce build times, the inclusions > should be done per-file, also avoiding to include unused headers and > should not be implicit. > > For this reason, move the inclusions to each file and remove unused > ones. > > Signed-off-by: AngeloGioacchino Del Regno < > angelogioacchino.delregno@collabora.com> > --- > drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8173.c | 4 ++++ > drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8183.c | 4 ++++ > drivers/phy/mediatek/phy-mtk-mipi-dsi.c | 7 +++++++ > drivers/phy/mediatek/phy-mtk-mipi-dsi.h | 10 ++-------- > 4 files changed, 17 insertions(+), 8 deletions(-) > > diff --git a/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8173.c > b/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8173.c > index 95a0d9a3cca7..59f028da9d3e 100644 > --- a/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8173.c > +++ b/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8173.c > @@ -4,7 +4,11 @@ > * Author: jitao.shi > */ > > +#include > +#include > +#include > #include > +#include > #include "phy-mtk-mipi-dsi.h" > > #define MIPITX_DSI_CON 0x00 > diff --git a/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8183.c > b/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8183.c > index 01b59527669e..6c6b192485ba 100644 > --- a/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8183.c > +++ b/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8183.c > @@ -4,7 +4,11 @@ > * Author: jitao.shi > */ > > +#include > +#include > +#include > #include > +#include > #include "phy-mtk-mipi-dsi.h" > > #define MIPITX_LANE_CON 0x000c > diff --git a/drivers/phy/mediatek/phy-mtk-mipi-dsi.c > b/drivers/phy/mediatek/phy-mtk-mipi-dsi.c > index 51b1b1d4ad38..6f7425b0bf5b 100644 > --- a/drivers/phy/mediatek/phy-mtk-mipi-dsi.c > +++ b/drivers/phy/mediatek/phy-mtk-mipi-dsi.c > @@ -3,7 +3,14 @@ > * Copyright (c) 2015 MediaTek Inc. > */ > > +#include > +#include > +#include > +#include > +#include > +#include > #include > +#include > #include "phy-mtk-mipi-dsi.h" > > inline struct mtk_mipi_tx *mtk_mipi_tx_from_clk_hw(struct clk_hw > *hw) > diff --git a/drivers/phy/mediatek/phy-mtk-mipi-dsi.h > b/drivers/phy/mediatek/phy-mtk-mipi-dsi.h > index 8d32e9027a15..4eb5fc91e083 100644 > --- a/drivers/phy/mediatek/phy-mtk-mipi-dsi.h > +++ b/drivers/phy/mediatek/phy-mtk-mipi-dsi.h > @@ -7,16 +7,10 @@ > #ifndef _MTK_MIPI_TX_H > #define _MTK_MIPI_TX_H > > -#include > #include > -#include > -#include > -#include > -#include > -#include > -#include > +#include > +#include > #include > -#include > I don't think it's good idea to move the common headers into .c files > struct mtk_mipitx_data { > const u32 mppll_preserve; _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel