Re: [PATCH v5 7/8] i2c: iproc: add NIC I2C support

From: Ray Jui
Date: Tue Apr 02 2019 - 21:11:11 EST




On 4/2/2019 10:57 AM, Ray Jui wrote:
>
>
> On 4/2/2019 3:27 AM, Wolfram Sang wrote:

[...]

>>> + iproc_i2c->type =
>>> + (enum bcm_iproc_i2c_type) of_device_get_match_data(&pdev->dev);
>>
>> No need to cast a void*.
>>

In fact, we do need to type cast here since 'iproc_i2c->type' is NOT a
pointer:

drivers/i2c/busses/i2c-bcm-iproc.c:870:18: error: incompatible types
when assigning to type ‘enum bcm_iproc_i2c_type’ from type ‘const void *’
iproc_i2c->type = of_device_get_match_data(&pdev->dev);
^
>
> Yes will fix.
>
> Thanks,
>
> Ray
>