aboutsummaryrefslogtreecommitdiff
path: root/include/linux/surface_aggregator/controller.h
diff options
context:
space:
mode:
authorMiquel Raynal <[email protected]>2022-05-20 10:22:21 +0200
committerAlexandre Belloni <[email protected]>2022-05-25 01:19:12 +0200
commit64d69b5daf6fe9b86236d34e57ba8ebf7d84f245 (patch)
tree2634bea5b9be4366ad1065da9740f40ba5484fd5 /include/linux/surface_aggregator/controller.h
parentb520cbe5be37b1b9b401c0b6ecbdae32575273db (diff)
rtc: rzn1: Avoid mixing variables
In the ->set_offset() callback, the 'val' variable is used for two different purposes at the same time, which is oviously wrong: - It contains the intermediate value of the SUBU register that must be written at the end of ->set_offset(). - It is used in the middle of the above calculations to poll the CTL2 register for a specific value. Let's introduce a 'ctl2' variable just for the readl_poll_timeout() call and use it there in place of 'var'. In order to avoid mixing those two variables again, let's rename the remaining occurences of 'val' into 'subu' and initialize it to 0 to avoid the uninitialized variable situation reported by Tom Rix and Colin Ian King already. Fixes: be4a11cf98af ("rtc: rzn1: Add oscillator offset support") Reported-by: Tom Rix <[email protected]> Reported-by: Colin Ian King <[email protected]> Signed-off-by: Miquel Raynal <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'include/linux/surface_aggregator/controller.h')
0 files changed, 0 insertions, 0 deletions