From: Alexandre Belloni <alexandre.belloni@bootlin•com>
To: Yury Norov <ynorov@nvidia•com>
Cc: "Thomas Gleixner" <tglx@kernel•org>,
"Ingo Molnar" <mingo@redhat•com>,
"Borislav Petkov" <bp@alien8•de>,
"Dave Hansen" <dave.hansen@linux•intel.com>,
"H. Peter Anvin" <hpa@zytor•com>,
"Andy Lutomirski" <luto@kernel•org>,
"Peter Zijlstra" <peterz@infradead•org>,
"Jonathan Cameron" <jic23@kernel•org>,
"David Lechner" <dlechner@baylibre•com>,
"Johannes Berg" <johannes@sipsolutions•net>,
"David Laight" <david.laight.linux@gmail•com>,
"Nuno Sá" <nuno.sa@analog•com>,
"Andy Shevchenko" <andy@kernel•org>,
"Ping-Ke Shih" <pkshih@realtek•com>,
"Richard Cochran" <richardcochran@gmail•com>,
"Andrew Lunn" <andrew+netdev@lunn•ch>,
"David S. Miller" <davem@davemloft•net>,
"Eric Dumazet" <edumazet@google•com>,
"Jakub Kicinski" <kuba@kernel•org>,
"Paolo Abeni" <pabeni@redhat•com>,
"Yury Norov" <yury.norov@gmail•com>,
"Rasmus Villemoes" <linux@rasmusvillemoes•dk>,
"Hans de Goede" <hansg@kernel•org>,
"Linus Walleij" <linusw@kernel•org>,
"Sakari Ailus" <sakari.ailus@linux•intel.com>,
"Salah Triki" <salah.triki@gmail•com>,
"Achim Gratz" <Achim.Gratz@stromeko•de>,
"Ben Collins" <bcollins@watter•com>,
x86@kernel•org, linux-kernel@vger•kernel.org,
linux-iio@vger•kernel.org, linux-wireless@vger•kernel.org,
netdev@vger•kernel.org, linux-rtc@vger•kernel.org
Subject: Re: [PATCH v2 8/9] rtc: rv3032: switch to using FIELD_GET_SIGNED()
Date: Tue, 28 Apr 2026 16:20:40 +0200 [thread overview]
Message-ID: <202604281420408aa2e078@mail.local> (raw)
In-Reply-To: <20260427214127.406067-9-ynorov@nvidia.com>
On 27/04/2026 17:41:25-0400, Yury Norov wrote:
> Switch from sign_extend32(FIELD_GET()) to the dedicated
> FIELD_GET_SIGNED() and don't calculate the fields length explicitly.
>
> Signed-off-by: Yury Norov <ynorov@nvidia•com>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin•com>
> ---
> drivers/rtc/rtc-rv3032.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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);
>
> --
> 2.51.0
>
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2026-04-28 14:20 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-27 21:41 [PATCH v2 0/9] bitfield: add FIELD_GET_SIGNED() Yury Norov
2026-04-27 21:41 ` [PATCH v2 1/9] " Yury Norov
2026-04-27 21:41 ` [PATCH v2 2/9] x86/extable: switch to using FIELD_GET_SIGNED() Yury Norov
2026-04-28 9:39 ` Peter Zijlstra
2026-04-29 19:00 ` Yury Norov
2026-04-27 21:41 ` [PATCH v2 3/9] iio: intel_dc_ti_adc: " Yury Norov
2026-04-27 21:41 ` [PATCH v2 4/9] iio: magnetometer: yas530: " Yury Norov
2026-04-27 21:41 ` [PATCH v2 5/9] iio: pressure: bmp280: " Yury Norov
2026-04-27 21:41 ` [PATCH v2 6/9] iio: mcp9600: " Yury Norov
2026-04-27 21:41 ` [PATCH v2 7/9] wifi: rtw89: " Yury Norov
2026-04-28 7:10 ` Andy Shevchenko
2026-04-28 10:43 ` David Laight
2026-04-29 0:39 ` Ping-Ke Shih
2026-04-29 0:40 ` Ping-Ke Shih
2026-04-27 21:41 ` [PATCH v2 8/9] rtc: rv3032: " Yury Norov
2026-04-28 14:20 ` Alexandre Belloni [this message]
2026-04-27 21:41 ` [PATCH v2 9/9] ptp: " Yury Norov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202604281420408aa2e078@mail.local \
--to=alexandre.belloni@bootlin$(echo .)com \
--cc=Achim.Gratz@stromeko$(echo .)de \
--cc=andrew+netdev@lunn$(echo .)ch \
--cc=andy@kernel$(echo .)org \
--cc=bcollins@watter$(echo .)com \
--cc=bp@alien8$(echo .)de \
--cc=dave.hansen@linux$(echo .)intel.com \
--cc=davem@davemloft$(echo .)net \
--cc=david.laight.linux@gmail$(echo .)com \
--cc=dlechner@baylibre$(echo .)com \
--cc=edumazet@google$(echo .)com \
--cc=hansg@kernel$(echo .)org \
--cc=hpa@zytor$(echo .)com \
--cc=jic23@kernel$(echo .)org \
--cc=johannes@sipsolutions$(echo .)net \
--cc=kuba@kernel$(echo .)org \
--cc=linusw@kernel$(echo .)org \
--cc=linux-iio@vger$(echo .)kernel.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-rtc@vger$(echo .)kernel.org \
--cc=linux-wireless@vger$(echo .)kernel.org \
--cc=linux@rasmusvillemoes$(echo .)dk \
--cc=luto@kernel$(echo .)org \
--cc=mingo@redhat$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=nuno.sa@analog$(echo .)com \
--cc=pabeni@redhat$(echo .)com \
--cc=peterz@infradead$(echo .)org \
--cc=pkshih@realtek$(echo .)com \
--cc=richardcochran@gmail$(echo .)com \
--cc=sakari.ailus@linux$(echo .)intel.com \
--cc=salah.triki@gmail$(echo .)com \
--cc=tglx@kernel$(echo .)org \
--cc=x86@kernel$(echo .)org \
--cc=ynorov@nvidia$(echo .)com \
--cc=yury.norov@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox