Re: [PATCH 2/2] i2c: i2c-cdns.c: Update driver to read fifo-depth from device tree

Heiko Schocher
2023-02-13T06:38:46Z

Hello Pei Yue Ho,

On 13.02.23 06:47, Heiko Schocher wrote:
> Hello Pei Yue Ho,
>
> On 04.01.23 08:20, Pei Yue Ho wrote:
>> Enable driver to fetch the optional parameter (fifo-depth)
>> from device tree. If the parameter is not found in the device
>> tree, it will use the default value declared in the driver.
>>
>> Signed-off-by: Pei Yue Ho <peiyue.ho@starfivetech.com>
>> Reviewed-by: Wei Liang Lim <weiliang.lim@starfivetech.com>
>> Reviewed-by: Eng Lee Teh <englee.teh@starfivetech.com>
>> ---
>> drivers/i2c/i2c-cdns.c | 26 ++++++++++++++++----------
>> 1 file changed, 16 insertions(+), 10 deletions(-)
>
> Reviewed-by: Heiko Schocher <hs@denx.de>

I am sorry, your patch drops error in gitlab Ci, see:

https://dev.azure.com/hs0298/110c3e42-44d5-4db4-9bd5-8a8bbead15f3/_apis/build/builds/100/logs/310

"""
2023-02-13T06:30:04.2539867Z arm: + xilinx_zynq_virt
2023-02-13T06:30:04.2540416Z +drivers/i2c/i2c-cdns.c: In function 'cdns_i2c_read_data':
2023-02-13T06:30:04.2541494Z +drivers/i2c/i2c-cdns.c:363:48: error: passing argument 1 of
'cdns_is_hold_quirk' makes pointer from integer without a cast [-Werror=int-conversion]
2023-02-13T06:30:04.2542415Z + 363 | if (cdns_is_hold_quirk(hold_quirk,
curr_recv_count))
2023-02-13T06:30:04.2542799Z + | ^~~~~~~~~~
2023-02-13T06:30:04.2543066Z + | |
2023-02-13T06:30:04.2579584Z + | int
2023-02-13T06:30:04.2580260Z +drivers/i2c/i2c-cdns.c:314:60: note: expected 'struct i2c_cdns_bus *'
but argument is of type 'int'
2023-02-13T06:30:04.2580754Z + 314 | static inline bool cdns_is_hold_quirk(struct i2c_cdns_bus
*i2c_bus, int hold_quirk,
2023-02-13T06:30:04.2581135Z + | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~
2023-02-13T06:30:04.2581604Z +drivers/i2c/i2c-cdns.c:363:29: error: too few arguments to function
'cdns_is_hold_quirk'
2023-02-13T06:30:04.2581973Z + | ^~~~~~~~~~~~~~~~~~
2023-02-13T06:30:04.2582352Z +drivers/i2c/i2c-cdns.c:314:20: note: declared here
2023-02-13T06:30:04.2582649Z + | ^~~~~~~~~~~~~~~~~~
2023-02-13T06:30:04.2583415Z +drivers/i2c/i2c-cdns.c:367:40: error: passing argument 1 of
'cdns_is_hold_quirk' makes pointer from integer without a cast [-Werror=int-conversion]
2023-02-13T06:30:04.2583944Z + 367 | if (cdns_is_hold_quirk(hold_quirk,
curr_recv_count)) {
2023-02-13T06:30:04.2584262Z + | ^~~~~~~~~~
2023-02-13T06:30:04.2584510Z + | |
2023-02-13T06:30:04.2584743Z + | int
2023-02-13T06:30:04.2585511Z +drivers/i2c/i2c-cdns.c:367:21: error: too few arguments to function
'cdns_is_hold_quirk'
2023-02-13T06:30:04.2585984Z + | ^~~~~~~~~~~~~~~~~~
2023-02-13T06:30:04.2586267Z +cc1: all warnings being treated as errors
2023-02-13T06:30:04.2586703Z +make[3]: *** [scripts/Makefile.build:257: drivers/i2c/i2c-cdns.o] Error 1
2023-02-13T06:30:04.2587106Z +make[2]: *** [scripts/Makefile.build:397: drivers/i2c] Error 2
2023-02-13T06:30:04.2587457Z +make[1]: *** [Makefile:1845: drivers] Error 2
2023-02-13T06:30:04.2587832Z +make: *** [Makefile:177: sub-make] Error 2
2023-02-13T06:30:04.2587979Z
2023-02-13T06:30:04.2588213Z 0 0 1 /1 xilinx_zynq_virt
"""

Please fix!

Thanks!