[PATCH 1/4] drm/mediatek: mtk_hdmi_ddc_v2: Fix non-static global variable

CK Hu (胡俊光) ck.hu at mediatek.com
Tue May 12 01:52:47 PDT 2026


On Wed, 2026-04-29 at 11:58 +0200, Louis-Alexis Eyraud wrote:
> The struct 'mtk_hdmi_ddc_v2_driver' is not used outside of the
> mtk_hdmi_ddc_v2.c file, so make it static to silence sparse warning:
> ```
> drivers/gpu/drm/mediatek/mtk_hdmi_ddc_v2.c:392:24: sparse: warning:
>   symbol 'mtk_hdmi_ddc_v2_driver' was not declared. Should it be
>   static?
> ```

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

> 
> Fixes: 8d0f79886273 ("drm/mediatek: Introduce HDMI/DDC v2 for MT8195/MT8188")
> Reported-by: kernel test robot <lkp at intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202604132044.fcYjEcU8-lkp@intel.com/ 
> Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud at collabora.com>
> ---
>  drivers/gpu/drm/mediatek/mtk_hdmi_ddc_v2.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi_ddc_v2.c b/drivers/gpu/drm/mediatek/mtk_hdmi_ddc_v2.c
> index d937219fdb7e..31e81a6de6d8 100644
> --- a/drivers/gpu/drm/mediatek/mtk_hdmi_ddc_v2.c
> +++ b/drivers/gpu/drm/mediatek/mtk_hdmi_ddc_v2.c
> @@ -389,7 +389,7 @@ static const struct of_device_id mtk_hdmi_ddc_v2_match[] = {
>  };
>  MODULE_DEVICE_TABLE(of, mtk_hdmi_ddc_v2_match);
>  
> -struct platform_driver mtk_hdmi_ddc_v2_driver = {
> +static struct platform_driver mtk_hdmi_ddc_v2_driver = {
>  	.probe = mtk_hdmi_ddc_v2_probe,
>  	.driver = {
>  		.name = "mediatek-hdmi-ddc-v2",
> 



More information about the Linux-mediatek mailing list