Re: [PATCH] ASoC: imx-audmux: Silence a clang warning

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

 



On Thu, May 26, 2022 at 9:05 AM Fabio Estevam <festevam@xxxxxxxxx> wrote:

> Change the of_device_get_match_data() cast to (uintptr_t)
> to silence the following clang warning:
>
> sound/soc/fsl/imx-audmux.c:301:16: warning: cast to smaller integer type
> 'enum imx_audmux_type' from 'const void *' [-Wvoid-pointer-to-enum-cast]
>
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Fixes: 6a8b8b582db1 ("ASoC: imx-audmux: Remove unused .id_table")
> Signed-off-by: Fabio Estevam <festevam@xxxxxxxxx>
>

Acked-by: Shengjiu Wang <shengjiu.wang@xxxxxxxxx>

best regards
wang shengjiu


> ---
>  sound/soc/fsl/imx-audmux.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/soc/fsl/imx-audmux.c b/sound/soc/fsl/imx-audmux.c
> index dfa05d40b276..a8e5e0f57faf 100644
> --- a/sound/soc/fsl/imx-audmux.c
> +++ b/sound/soc/fsl/imx-audmux.c
> @@ -298,7 +298,7 @@ static int imx_audmux_probe(struct platform_device
> *pdev)
>                 audmux_clk = NULL;
>         }
>
> -       audmux_type = (enum
> imx_audmux_type)of_device_get_match_data(&pdev->dev);
> +       audmux_type = (uintptr_t)of_device_get_match_data(&pdev->dev);
>
>         switch (audmux_type) {
>         case IMX31_AUDMUX:
> --
> 2.25.1
>
>



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux