mmc: mxcmmc: Silence a clang warning
authorFabio Estevam <festevam@gmail.com>
Thu, 26 May 2022 01:00:22 +0000 (22:00 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:23:50 +0000 (14:23 +0200)
[ Upstream commit 7dc65e3c0ef4b746a583b7c58f99873fddf5ccfa ]

Change the of_device_get_match_data() cast to (uintptr_t)
to silence the following clang warning:

drivers/mmc/host/mxcmmc.c:1028:18: warning: cast to smaller integer type 'enum mxcmci_type' from 'const void *' [-Wvoid-pointer-to-enum-cast]

Reported-by: kernel test robot <lkp@intel.com>
Fixes: 8223e885e74b ("mmc: mxc: Convert the driver to DT-only")
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20220526010022.1163483-1-festevam@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mmc/host/mxcmmc.c

index 2fe6fcdbb1b305613cb6ee4e8f6601e60f9f2bb5..9bf95ba217facc7d3025207c67c732e3a8224b17 100644 (file)
@@ -1025,7 +1025,7 @@ static int mxcmci_probe(struct platform_device *pdev)
        mmc->max_req_size = mmc->max_blk_size * mmc->max_blk_count;
        mmc->max_seg_size = mmc->max_req_size;
 
-       host->devtype = (enum mxcmci_type)of_device_get_match_data(&pdev->dev);
+       host->devtype = (uintptr_t)of_device_get_match_data(&pdev->dev);
 
        /* adjust max_segs after devtype detection */
        if (!is_mpc512x_mmc(host))