Re: [PATCH] drm/bridge/synopsys: dsi: readl_poll_timeout return value clean up

From: Andrzej Hajda
Date: Mon Mar 05 2018 - 08:26:10 EST


On 02.03.2018 14:15, Philippe CORNU wrote:
> Hi Andrzej,
>
>
> On 03/02/2018 11:21 AM, Andrzej Hajda wrote:
>> On 01.03.2018 10:00, Philippe CORNU wrote:
>>> Hi Archit, Andrzej & Laurent,
>>>
>>> May I ask you please your feedback on this small patch?
>>> Many thanks,
>>>
>>> Philippe :-)
>>>
>>> On 02/04/2018 10:36 PM, Philippe Cornu wrote:
>>>> The readl_poll_timeout() return value is 0 in case of success
>>>> so it is better to detect errors without taking care of the
>>>> return value sign.
>>>>
>>>> Signed-off-by: Philippe Cornu <philippe.cornu@xxxxxx>
>> The patch is of course correct. However I am not sure if necessary. For
>> sure functionally it does not change anything.
>> AFAIK kernel CodingStyle says nothing about it, so I suppose it is
>> matter of personal taste.
> I sent this tiny patch in order to homogenize the dw mipi driver because
> there were both cases "if (ret)" & "if (ret < 0)" in the source code.
>
> I did not really find a preferred way in the kernel source code so I
> selected what sounds the best to me ie "if (ret)" but it is not a
> problem to make another patch for "if (ret < 0)" everywhere :-)
>
> In any case, the most important from my pov is to have a homogeneous
> source code :-)

OK

Queued to drm-misc-next.

Regards
Andrzej