[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a93ca301-243a-4e75-afa5-fdf80b20eb8f@roeck-us.net>
Date: Tue, 6 Feb 2024 09:37:32 -0800
From: Guenter Roeck <linux@...ck-us.net>
To: Ben Wolsieffer <ben.wolsieffer@...ring.com>, linux-kernel@...r.kernel.org
Cc: Mark Brown <broonie@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>
Subject: Re: [PATCH] regmap: kunit: fix raw noinc write test wrapping
On 2/6/24 07:10, Ben Wolsieffer wrote:
> The raw noinc write test places a known value in the register following
> the noinc register to verify that it is not disturbed by the noinc
> write. This test ensures this value is distinct by adding 100 to the
> second element of the noinc write data.
>
> The regmap registers are 16-bit, while the test value is stored in an
> unsigned int. Therefore, adding 100 may cause the register to wrap while
> the test value does not, causing the test to fail. This patch fixes this
> by changing val_test and val_last from unsigned int to u16.
>
> Signed-off-by: Ben Wolsieffer <ben.wolsieffer@...ring.com>
> Reported-by: Guenter Roeck <linux@...ck-us.net>
> Closes: https://lore.kernel.org/linux-kernel/745d3a11-15bc-48b6-84c8-c8761c943bed@roeck-us.net/T/
I no longer see the problem with this patch applied.
Tested-by: Guenter Roeck <linux@...ck-us.net>
Thanks,
Guenter
Powered by blists - more mailing lists