[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <yl3p5426peztl2x4nnsvtoelo42bzsali53lmwpysh7cfp5qli@u3fmcmo6tkjh>
Date: Sat, 10 Aug 2024 19:03:40 +0200
From: Uwe Kleine-König <u.kleine-koenig@...libre.com>
To: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>,
"Rob Herring (Arm)" <robh@...nel.org>
Cc: linux-pwm@...r.kernel.org, linux-kernel@...r.kernel.org,
Abaci Robot <abaci@...ux.alibaba.com>
Subject: Re: [PATCH -next] pwm: lp3943: Fix an incorrect type in
lp3943_pwm_parse_dt()
Hello,
On Fri, Aug 09, 2024 at 10:50:49AM +0200, Uwe Kleine-König wrote:
> On 8/9/24 10:05, Jiapeng Chong wrote:
> > The return value from the call to of_property_count_u32_elems() is int.
> > However, the return value is being assigned to an u32 variable
> > 'num_outputs', so making 'num_outputs' an int.
> >
> > ./drivers/pwm/pwm-lp3943.c:238:6-17: WARNING: Unsigned expression compared with zero: num_outputs <= 0.
>
> Which tool does emit this warning? My test build (with C=1 and W=1) doesn't
> emit it.
>
> > Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
> > Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9710
> > Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
>
> This problem was introduced in a commit in next:
>
> Fixes: d6a56f3bb650 ("pwm: lp3943: Use of_property_count_u32_elems() to get
> property length")
>
> Rob: I guess this wasn't the only conversion of this type. Maybe these
> others suffer from the same problem?!
I hoped for some more feedback, but anyhow: Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux.git pwm/for-next
with the Fixes line.
Best regards
Uwe
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists