Re: [linux-next:master 6953/13205] drivers/dma/imx-dma.c:1048:20: warning: cast to smaller integer type 'enum imx_dma_type' from 'const void

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

 



On Fri, Dec 11, 2020 at 11:54 AM Souptick Joarder <jrdr.linux@xxxxxxxxx> wrote:

> of_device_get_match_data() returns void * which is assigned to enum
> imx_dma_type type without extracting
> the value. Anything wrong with the previous assignment ?

The driver data is now passed via:
imxdma->devtype = (enum imx_dma_type)of_device_get_match_data(&pdev->dev);

There was nothing wrong with the previous assignment.

The original driver used to run on non-DT platforms. Now it only runs
on DT-platforms, which means we no longer need the platform data
structure.

Please note that this a W=1 clang warning. gcc does not complain about it.

Not sure how to make clang happy in this case.

The (enum ....)of_device_get_match_data() cast is widely used in the
kernel, so this is not specific usage in this driver.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux