i2c: mxs: Silence a clang warning
authorFabio Estevam <festevam@gmail.com>
Thu, 26 May 2022 01:09:14 +0000 (22:09 -0300)
committerWolfram Sang <wsa@kernel.org>
Wed, 8 Jun 2022 20:19:16 +0000 (22:19 +0200)
Change the of_device_get_match_data() cast to (uintptr_t)
to silence the following clang warning:

drivers/i2c/busses/i2c-mxs.c:802:18: warning: cast to smaller integer type 'enum mxs_i2c_devtype' from 'const void *' [-Wvoid-pointer-to-enum-cast]

Reported-by: kernel test robot <lkp@intel.com>
Fixes: c32abd8b5691 ("i2c: mxs: Remove unneeded platform_device_id")
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-mxs.c

index 864a3f1..68f67d0 100644 (file)
@@ -799,7 +799,7 @@ static int mxs_i2c_probe(struct platform_device *pdev)
        if (!i2c)
                return -ENOMEM;
 
-       i2c->dev_type = (enum mxs_i2c_devtype)of_device_get_match_data(&pdev->dev);
+       i2c->dev_type = (uintptr_t)of_device_get_match_data(&pdev->dev);
 
        i2c->regs = devm_platform_ioremap_resource(pdev, 0);
        if (IS_ERR(i2c->regs))