From: Chunfeng Yun <chunfeng.yun@mediatek.com>
To: AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
<chunkuang.hu@kernel.org>
Cc: <p.zabel@pengutronix.de>, <kishon@ti.com>, <vkoul@kernel.org>,
<matthias.bgg@gmail.com>, <dri-devel@lists.freedesktop.org>,
<linux-mediatek@lists.infradead.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-phy@lists.infradead.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/4] phy: mediatek: phy-mtk-hdmi: Reorder and stop implicit header inclusion
Date: Thu, 6 Jan 2022 17:22:05 +0800 [thread overview]
Message-ID: <c3773ed47126bf3810bc7d78e3ec293f144ccd7f.camel@mediatek.com> (raw)
In-Reply-To: <20220103153055.50473-3-angelogioacchino.delregno@collabora.com>
On Mon, 2022-01-03 at 16:30 +0100, AngeloGioacchino Del Regno wrote:
> All the headers for phy-mtk-{hdmi,hdmi-mt2701,hdmi-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-hdmi-mt2701.c | 5 +++++
> drivers/phy/mediatek/phy-mtk-hdmi-mt8173.c | 5 +++++
> drivers/phy/mediatek/phy-mtk-hdmi.c | 8 ++++++++
> drivers/phy/mediatek/phy-mtk-hdmi.h | 10 +---------
> 4 files changed, 19 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/phy/mediatek/phy-mtk-hdmi-mt2701.c
> b/drivers/phy/mediatek/phy-mtk-hdmi-mt2701.c
> index 09e0dd7499d8..270c5f538483 100644
> --- a/drivers/phy/mediatek/phy-mtk-hdmi-mt2701.c
> +++ b/drivers/phy/mediatek/phy-mtk-hdmi-mt2701.c
> @@ -4,6 +4,11 @@
> * Author: Chunhui Dai <chunhui.dai@mediatek.com>
> */
>
> +#include <linux/clk-provider.h>
> +#include <linux/delay.h>
> +#include <linux/device.h>
> +#include <linux/module.h>
> +#include <linux/regmap.h>
> #include "phy-mtk-hdmi.h"
>
> #define HDMI_CON0 0x00
> diff --git a/drivers/phy/mediatek/phy-mtk-hdmi-mt8173.c
> b/drivers/phy/mediatek/phy-mtk-hdmi-mt8173.c
> index e317bf4a9db9..87ba9a3687b7 100644
> --- a/drivers/phy/mediatek/phy-mtk-hdmi-mt8173.c
> +++ b/drivers/phy/mediatek/phy-mtk-hdmi-mt8173.c
> @@ -4,6 +4,11 @@
> * Author: Jie Qiu <jie.qiu@mediatek.com>
> */
>
> +#include <linux/clk-provider.h>
> +#include <linux/delay.h>
> +#include <linux/device.h>
> +#include <linux/module.h>
> +#include <linux/regmap.h>
> #include "phy-mtk-hdmi.h"
>
> #define HDMI_CON0 0x00
> diff --git a/drivers/phy/mediatek/phy-mtk-hdmi.c
> b/drivers/phy/mediatek/phy-mtk-hdmi.c
> index b4193cb4e4e3..e037fa89696c 100644
> --- a/drivers/phy/mediatek/phy-mtk-hdmi.c
> +++ b/drivers/phy/mediatek/phy-mtk-hdmi.c
> @@ -4,6 +4,14 @@
> * Author: Jie Qiu <jie.qiu@mediatek.com>
> */
>
> +#include <linux/clk.h>
> +#include <linux/clk-provider.h>
> +#include <linux/device.h>
> +#include <linux/module.h>
> +#include <linux/of_device.h>
> +#include <linux/platform_device.h>
> +#include <linux/regmap.h>
> +#include <linux/phy/phy.h>
> #include "phy-mtk-hdmi.h"
>
> inline struct mtk_hdmi_phy *to_mtk_hdmi_phy(struct clk_hw *hw)
> diff --git a/drivers/phy/mediatek/phy-mtk-hdmi.h
> b/drivers/phy/mediatek/phy-mtk-hdmi.h
> index a0571271d730..ef81e44a235d 100644
> --- a/drivers/phy/mediatek/phy-mtk-hdmi.h
> +++ b/drivers/phy/mediatek/phy-mtk-hdmi.h
> @@ -6,17 +6,9 @@
>
> #ifndef _MTK_HDMI_PHY_H
> #define _MTK_HDMI_PHY_H
> -#include <linux/clk.h>
> +
> #include <linux/clk-provider.h>
> -#include <linux/delay.h>
> -#include <linux/io.h>
> -#include <linux/mfd/syscon.h>
> -#include <linux/module.h>
> -#include <linux/of_device.h>
> -#include <linux/phy/phy.h>
> -#include <linux/platform_device.h>
> #include <linux/regmap.h>
> -#include <linux/types.h>
Please do not move common headers also into .c files
>
> struct mtk_hdmi_phy;
>
next prev parent reply other threads:[~2022-01-06 9:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-03 15:30 [PATCH 1/4] phy: mediatek: phy-mtk-hdmi: Switch to regmap for mmio access AngeloGioacchino Del Regno
2022-01-03 15:30 ` [PATCH 2/4] phy: mediatek: phy-mtk-hdmi: Reorder to remove forward declarations AngeloGioacchino Del Regno
2022-01-06 9:24 ` Chunfeng Yun
2022-01-03 15:30 ` [PATCH 3/4] phy: mediatek: phy-mtk-hdmi: Reorder and stop implicit header inclusion AngeloGioacchino Del Regno
2022-01-06 9:22 ` Chunfeng Yun [this message]
2022-01-03 15:30 ` [PATCH 4/4] phy: mediatek: phy-mtk-hdmi: Simplify with dev_err_probe() AngeloGioacchino Del Regno
2022-01-06 9:20 ` Chunfeng Yun
2022-01-06 8:26 ` [PATCH 1/4] phy: mediatek: phy-mtk-hdmi: Switch to regmap for mmio access Chunfeng Yun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c3773ed47126bf3810bc7d78e3ec293f144ccd7f.camel@mediatek.com \
--to=chunfeng.yun@mediatek.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=chunkuang.hu@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=kishon@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-phy@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=p.zabel@pengutronix.de \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®