[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <889235d3-a5a2-417d-dc47-dbcf543c8549@loongson.cn>
Date: Thu, 25 May 2023 17:28:36 +0800
From: zhuyinbo <zhuyinbo@...ngson.cn>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Mark Brown <broonie@...nel.org>, Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
linux-spi@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, Jianmin Lv <lvjianmin@...ngson.cn>,
wanghongliang@...ngson.cn, Liu Peibao <liupeibao@...ngson.cn>,
loongson-kernel@...ts.loongnix.cn, zhuyinbo@...ngson.cn
Subject: Re: [PATCH v11 2/2] spi: loongson: add bus driver for the loongson
spi controller
在 2023/5/25 下午5:16, Andy Shevchenko 写道:
> On Thu, May 25, 2023 at 6:34 AM zhuyinbo <zhuyinbo@...ngson.cn> wrote:
>> 在 2023/5/24 下午4:42, Andy Shevchenko 写道:
>>> On Wed, May 24, 2023 at 10:52 AM zhuyinbo <zhuyinbo@...ngson.cn> wrote:
>>>> 在 2023/5/23 下午8:54, andy.shevchenko@...il.com 写道:
>>>>> Mon, May 22, 2023 at 03:10:30PM +0800, Yinbo Zhu kirjoitti:
>
> ...
>
>>>>>> + ret = loongson_spi_init_master(dev, reg_base);
>>>>>> + if (ret)
>>>>>> + return dev_err_probe(dev, ret, "failed to initialize master\n");
>>>>>> +
>>>>>> + return ret;
>>>>>
>>>>> return 0;
>>>>
>>>> It seems was more appropriate that initialize ret then return ret.
>>>> Do you think so ?
>>>
>>> What do you mean and how does it help here?
>>
>> I'm sorry, I was wrong before and the ret varible seems not to be
>> initialized and it always record the return value for
>> loongson_spi_init_master.
>>
>> It seems was appropriate that use "return ret" and I don't got your
>> point that in probe for use "return 0"
>
> In the above excerpt you will return anything except 0 with return
> dev_err_probe(); line. Why do you still need to return ret; at the end
> of the function?
I'm sorry, I misread it and you are right and I will "return 0".
Thanks,
Yinbo.
Powered by blists - more mailing lists