Message ID | 20220526010022.1163483-1-festevam@gmail.com |
---|---|
State | New |
Headers | show |
Series | mmc: mxc: Silence a clang warning | expand |
On Thu, 26 May 2022 at 03:00, Fabio Estevam <festevam@gmail.com> wrote: > > 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> Queued for v5.20 on the devel branch, thanks! Kind regards Uffe > --- > drivers/mmc/host/mxcmmc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c > index de04b5afef2e..613f13306433 100644 > --- a/drivers/mmc/host/mxcmmc.c > +++ b/drivers/mmc/host/mxcmmc.c > @@ -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)) > -- > 2.25.1 >
diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c index de04b5afef2e..613f13306433 100644 --- a/drivers/mmc/host/mxcmmc.c +++ b/drivers/mmc/host/mxcmmc.c @@ -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))
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> --- drivers/mmc/host/mxcmmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)