Skip to content

Commit

Permalink
regmap: kunit: Fix marking of the range window as volatile
Browse files Browse the repository at this point in the history
For some reason the regmap used for testing ranges was not including the
end of the range of paged registers as volatile since it found the end by
counting from the selector register rather than the base of the window.

Signed-off-by: Mark Brown <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
broonie committed Oct 26, 2023
1 parent d360185 commit fabe32c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/base/regmap/regmap-kunit.c
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ static struct regmap_range_cfg test_range = {
static bool test_range_volatile(struct device *dev, unsigned int reg)
{
if (reg >= test_range.window_start &&
reg <= test_range.selector_reg + test_range.window_len)
reg <= test_range.window_start + test_range.window_len)
return true;

if (reg >= test_range.range_min && reg <= test_range.range_max)
Expand Down

0 comments on commit fabe32c

Please sign in to comment.