[PATCH v6 8/9] drm/mediatek: dsi: Compress of_device_id entries and add sentinel

AngeloGioacchino Del Regno posted 9 patches 9 months ago
[PATCH v6 8/9] drm/mediatek: dsi: Compress of_device_id entries and add sentinel
Posted by AngeloGioacchino Del Regno 9 months ago
All entries fit in 82 columns, which is acceptable: compress all of
the mtk_dsi_of_match[] entries to a single line for each.

While at it, also add the usual sentinel comment to the last entry.

Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
 drivers/gpu/drm/mediatek/mtk_dsi.c | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c
index 195ff4dfc3a3..b644505de98a 100644
--- a/drivers/gpu/drm/mediatek/mtk_dsi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
@@ -1204,17 +1204,12 @@ static const struct mtk_dsi_driver_data mt8188_dsi_driver_data = {
 };
 
 static const struct of_device_id mtk_dsi_of_match[] = {
-	{ .compatible = "mediatek,mt2701-dsi",
-	  .data = &mt2701_dsi_driver_data },
-	{ .compatible = "mediatek,mt8173-dsi",
-	  .data = &mt8173_dsi_driver_data },
-	{ .compatible = "mediatek,mt8183-dsi",
-	  .data = &mt8183_dsi_driver_data },
-	{ .compatible = "mediatek,mt8186-dsi",
-	  .data = &mt8186_dsi_driver_data },
-	{ .compatible = "mediatek,mt8188-dsi",
-	  .data = &mt8188_dsi_driver_data },
-	{ },
+	{ .compatible = "mediatek,mt2701-dsi", .data = &mt2701_dsi_driver_data },
+	{ .compatible = "mediatek,mt8173-dsi", .data = &mt8173_dsi_driver_data },
+	{ .compatible = "mediatek,mt8183-dsi", .data = &mt8183_dsi_driver_data },
+	{ .compatible = "mediatek,mt8186-dsi", .data = &mt8186_dsi_driver_data },
+	{ .compatible = "mediatek,mt8188-dsi", .data = &mt8188_dsi_driver_data },
+	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, mtk_dsi_of_match);
 
-- 
2.43.0
Re: [PATCH v6 8/9] drm/mediatek: dsi: Compress of_device_id entries and add sentinel
Posted by CK Hu (胡俊光) 9 months ago
Hi, Angelo:

On Thu, 2024-02-15 at 09:53 +0100, AngeloGioacchino Del Regno wrote:
> All entries fit in 82 columns, which is acceptable: compress all of
> the mtk_dsi_of_match[] entries to a single line for each.
> 
> While at it, also add the usual sentinel comment to the last entry.

Reviewed-by: CK Hu <ck.hu@mediatek.com>

> 
> Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
> Signed-off-by: AngeloGioacchino Del Regno <
> angelogioacchino.delregno@collabora.com>
> ---
>  drivers/gpu/drm/mediatek/mtk_dsi.c | 17 ++++++-----------
>  1 file changed, 6 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c
> b/drivers/gpu/drm/mediatek/mtk_dsi.c
> index 195ff4dfc3a3..b644505de98a 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dsi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
> @@ -1204,17 +1204,12 @@ static const struct mtk_dsi_driver_data
> mt8188_dsi_driver_data = {
>  };
>  
>  static const struct of_device_id mtk_dsi_of_match[] = {
> -	{ .compatible = "mediatek,mt2701-dsi",
> -	  .data = &mt2701_dsi_driver_data },
> -	{ .compatible = "mediatek,mt8173-dsi",
> -	  .data = &mt8173_dsi_driver_data },
> -	{ .compatible = "mediatek,mt8183-dsi",
> -	  .data = &mt8183_dsi_driver_data },
> -	{ .compatible = "mediatek,mt8186-dsi",
> -	  .data = &mt8186_dsi_driver_data },
> -	{ .compatible = "mediatek,mt8188-dsi",
> -	  .data = &mt8188_dsi_driver_data },
> -	{ },
> +	{ .compatible = "mediatek,mt2701-dsi", .data =
> &mt2701_dsi_driver_data },
> +	{ .compatible = "mediatek,mt8173-dsi", .data =
> &mt8173_dsi_driver_data },
> +	{ .compatible = "mediatek,mt8183-dsi", .data =
> &mt8183_dsi_driver_data },
> +	{ .compatible = "mediatek,mt8186-dsi", .data =
> &mt8186_dsi_driver_data },
> +	{ .compatible = "mediatek,mt8188-dsi", .data =
> &mt8188_dsi_driver_data },
> +	{ /* sentinel */ }
>  };
>  MODULE_DEVICE_TABLE(of, mtk_dsi_of_match);
>