Patch "drm/mediatek: Fix void-pointer-to-enum-cast warning" has been added to the 6.5-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/mediatek: Fix void-pointer-to-enum-cast warning

to the 6.5-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-mediatek-fix-void-pointer-to-enum-cast-warning.patch
and it can be found in the queue-6.5 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit dfb5679becf99d7113bf120609fdc3a4eb332ecc
Author: Jason-JH.Lin <jason-jh.lin@xxxxxxxxxxxx>
Date:   Wed Jun 21 15:54:21 2023 +0800

    drm/mediatek: Fix void-pointer-to-enum-cast warning
    
    [ Upstream commit 89cba955f879b1c6a9a71f67c8fb92ea8f5dfdc4 ]
    
    1. Fix build warning message in mtk_disp_ovl_adaptor.c
    >> drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c:415:10:
      warning: cast to smaller integer type 'enum mtk_ovl_adaptor_comp_type'
      from 'const void *' [-Wvoid-pointer-to-enum-cast]
    
      type = (enum mtk_ovl_adaptor_comp_type)of_id->data;
    
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
             1 warning generated.
    
    2. Also fix the same warning message in mtk_drm_drv.c
    >> drivers/gpu/drm/mediatek/mtk_drm_drv.c:832:15:
       warning: cast to smaller integer type 'enum mtk_ddp_comp_type'
       from 'const void *' [-Wvoid-pointer-to-enum-cast]
    
       comp_type = (enum mtk_ddp_comp_type)of_id->data;
    
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                   1 warning generated.
    
    Signed-off-by: Jason-JH.Lin <jason-jh.lin@xxxxxxxxxxxx>
    Fixes: 453c3364632a ("drm/mediatek: Add ovl_adaptor support for MT8195")
    Reported-by: kernel test robot <lkp@xxxxxxxxx>
    Closes: https://lore.kernel.org/oe-kbuild-all/202305042054.ZtWME9OU-lkp@xxxxxxxxx/
    Reviewed-by: CK Hu <ck.hu@xxxxxxxxxxxx>
    Link: https://patchwork.kernel.org/project/dri-devel/patch/20230621075421.1982-1-jason-jh.lin@xxxxxxxxxxxx/
    Signed-off-by: Chun-Kuang Hu <chunkuang.hu@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c b/drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c
index c0a38f5217eee..f2f6a5c01a6d2 100644
--- a/drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c
+++ b/drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c
@@ -426,7 +426,7 @@ static int ovl_adaptor_comp_init(struct device *dev, struct component_match **ma
 			continue;
 		}
 
-		type = (enum mtk_ovl_adaptor_comp_type)of_id->data;
+		type = (enum mtk_ovl_adaptor_comp_type)(uintptr_t)of_id->data;
 		id = ovl_adaptor_comp_get_id(dev, node, type);
 		if (id < 0) {
 			dev_warn(dev, "Skipping unknown component %pOF\n",
diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
index fc217e0acd45d..30d10f21562f4 100644
--- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c
+++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
@@ -832,7 +832,7 @@ static int mtk_drm_probe(struct platform_device *pdev)
 			continue;
 		}
 
-		comp_type = (enum mtk_ddp_comp_type)of_id->data;
+		comp_type = (enum mtk_ddp_comp_type)(uintptr_t)of_id->data;
 
 		if (comp_type == MTK_DISP_MUTEX) {
 			int id;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux