[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1405e340-db97-47f8-aa56-5f507ccd821a@suswa.mountain>
Date: Tue, 5 Nov 2024 18:54:53 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Zicheng Qu <quzicheng@...wei.com>
Cc: lars@...afoo.de, Michael.Hennerich@...log.com, jic23@...nel.org,
gregkh@...uxfoundation.org, cristina.opriceana@...il.com,
daniel.baluta@...el.com, linux-iio@...r.kernel.org,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
tanghui20@...wei.com, zhangqiao22@...wei.com,
judy.chenhui@...wei.com
Subject: Re: [PATCH 1/2] staging: iio: ad9834: Correct phase range check
On Tue, Nov 05, 2024 at 02:03:58PM +0000, Zicheng Qu wrote:
> The phase register for the AD9834 is 12 bits, which means the valid
> phase values range from 0 to 4095 (2^12 - 1). The current check uses a
> greater-than condition with BIT(12), which equals 4096. This allows an
> invalid phase value of 4096 to pass.
>
I tried to figure out how this looks like to the user but I didn't
figure it out right away. Please add this information to the commit
message.
> This patch corrects the check to use greater-than-or-equal-to, ensuring
> that only phase values within the valid range are accepted.
>
> Fixes: f1d05b5f68cb ("Staging: iio: Prefer using the BIT macro")
The Fixes tag is wrong. It should be:
Fixes: 12b9d5bf76bf ("Staging: IIO: DDS: AD9833 / AD9834 driver")
regards,
dan carpenter
Powered by blists - more mailing lists