Skip to content

Commit

Permalink
mmc: mxcmmc: Silence a clang warning
Browse files Browse the repository at this point in the history
[ Upstream commit 7dc65e3 ]

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: 8223e88 ("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>
  • Loading branch information
fabioestevam authored and gregkh committed Aug 17, 2022
1 parent 352377c commit 268afd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mmc/host/mxcmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 268afd4

Please sign in to comment.