diff options
| author | Yury Norov <ynorov@nvidia.com> | 2026-04-27 17:41:25 -0400 |
|---|---|---|
| committer | Yury Norov <ynorov@nvidia.com> | 2026-05-20 11:18:27 -0400 |
| commit | f0e5d07ac5516afd99f9930db9a085619b7895b9 (patch) | |
| tree | 418a011c73d9d47405ec6d0eeb6e2a61d30b72bf /drivers/rtc | |
| parent | 115e1f213c0854cc0223e54dc4d0c887363a26e0 (diff) | |
| download | linux-next-f0e5d07ac5516afd99f9930db9a085619b7895b9.tar.gz linux-next-f0e5d07ac5516afd99f9930db9a085619b7895b9.zip | |
rtc: rv3032: switch to using FIELD_GET_SIGNED()
Switch from sign_extend32(FIELD_GET()) to the dedicated
FIELD_GET_SIGNED() and don't calculate the fields length explicitly.
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Yury Norov <ynorov@nvidia.com>
Diffstat (limited to 'drivers/rtc')
| -rw-r--r-- | drivers/rtc/rtc-rv3032.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-rv3032.c b/drivers/rtc/rtc-rv3032.c index 6c09da7738e1..6bafdec637ae 100644 --- a/drivers/rtc/rtc-rv3032.c +++ b/drivers/rtc/rtc-rv3032.c @@ -376,7 +376,7 @@ static int rv3032_read_offset(struct device *dev, long *offset) if (ret < 0) return ret; - steps = sign_extend32(FIELD_GET(RV3032_OFFSET_MSK, value), 5); + steps = FIELD_GET_SIGNED(RV3032_OFFSET_MSK, value); *offset = DIV_ROUND_CLOSEST(steps * OFFSET_STEP_PPT, 1000); |
