[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <53480bd1-0b6f-053c-b1fd-b04de7b49096@linaro.org>
Date: Mon, 15 May 2023 15:39:50 +0000
From: Caleb Connolly <caleb.connolly@...aro.org>
To: Bjorn Andersson <andersson@...nel.org>
Cc: Bjorn Andersson <quic_bjorande@...cinc.com>,
Pavel Machek <pavel@....cz>, Lee Jones <lee@...nel.org>,
Anjelique Melendez <quic_amelende@...cinc.com>,
Uwe Kleine-König <u.kleine-koenig@...gutronix.de>,
Luca Weiss <luca@...tu.xyz>, linux-leds@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org
Subject: Re: [PATCH] leds: qcom-lpg: Fix PWM period limits
On 15/05/2023 02:20, Bjorn Andersson wrote:
> On Sat, May 13, 2023 at 10:09:49AM +0000, Caleb Connolly wrote:
>>
>>
>> On 12/05/2023 16:55, Bjorn Andersson wrote:
>>> The introduction of high resolution PWM support moved the parenthesis of
>>> the divisions in the calculation of min and max period. The result in
>>> both divisions is in most cases truncation to 0, which limits the period
>>> to the range of [0, 0].
>>
>> Huh, TIL C gives multiplication and division the same precedence when
>> deciding order of operations.
>
> There where no explicit parenthesis in the original implementation. So
> I guess it would be more correct to state that parenthesis was
> introduced around part of the expression?
It might be clearer just to say the div64_u64 changed the order of
operations.
>
> Let me know if you think the wording matters and you would prefer me to
> rewrite it.
Yeah, that would be appreciated
Thanks
>
> Regards,
> Bjorn
>
--
Kind Regards,
Caleb (they/them)
Powered by blists - more mailing lists