From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: "Michael Turquette" <mturquette@baylibre.com>,
"Stephen Boyd" <sboyd@kernel.org>,
"Nicolas Ferre" <nicolas.ferre@microchip.com>,
"Claudiu Beznea" <claudiu.beznea@tuxon.dev>,
"Giovanni Cabiddu" <giovanni.cabiddu@intel.com>,
"Herbert Xu" <herbert@gondor.apana.org.au>,
"David Miller" <davem@davemloft.net>,
"Linus Walleij" <linus.walleij@linaro.org>,
"Bartosz Golaszewski" <brgl@bgdev.pl>,
"Joel Stanley" <joel@jms.id.au>,
"Andrew Jeffery" <andrew@codeconstruct.com.au>,
"Crt Mori" <cmo@melexis.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Jacky Huang" <ychuang3@nuvoton.com>,
"Shan-Chun Hung" <schung@nuvoton.com>,
"Yury Norov" <yury.norov@gmail.com>,
"Rasmus Villemoes" <linux@rasmusvillemoes.dk>,
"Jaroslav Kysela" <perex@perex.cz>,
"Takashi Iwai" <tiwai@suse.com>,
"Johannes Berg" <johannes@sipsolutions.net>,
"Jakub Kicinski" <kuba@kernel.org>, "Alex Elder" <elder@ieee.org>,
"David Laight" <david.laight.linux@gmail.com>,
"Vincent Mailhol" <mailhol.vincent@wanadoo.fr>,
"Jason Baron" <jbaron@akamai.com>,
"Borislav Petkov" <bp@alien8.de>,
"Tony Luck" <tony.luck@intel.com>,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
"Kim Seer Paller" <kimseer.paller@analog.com>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Richard Genoud" <richard.genoud@bootlin.com>,
"Cosmin Tanislav" <demonsingur@gmail.com>,
"Biju Das" <biju.das.jz@bp.renesas.com>,
"Jianping Shen" <Jianping.Shen@de.bosch.com>,
linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-renesas-soc@vger.kernel.org, linux-crypto@vger.kernel.org,
linux-edac@vger.kernel.org, qat-linux@intel.com,
linux-gpio@vger.kernel.org, linux-aspeed@lists.ozlabs.org,
linux-iio@vger.kernel.org, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 01/23] clk: at91: pmc: #undef field_{get,prep}() before definition
Date: Mon, 27 Oct 2025 21:36:40 +0100 [thread overview]
Message-ID: <20251027203640291d726b@mail.local> (raw)
In-Reply-To: <a26cfb39f4ac309ffbff339ffa5f54db12bd8c12.1761588465.git.geert+renesas@glider.be>
On 27/10/2025 19:41:35+0100, Geert Uytterhoeven wrote:
> Prepare for the advent of globally available common field_get() and
> field_prep() macros by undefining the symbols before defining local
> variants. This prevents redefinition warnings from the C preprocessor
> when introducing the common macros later.
>
> Suggested-by: Yury Norov <yury.norov@gmail.com>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
> --
> v5:
> - New.
> ---
> drivers/clk/at91/pmc.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/clk/at91/pmc.h b/drivers/clk/at91/pmc.h
> index 5daa32c4cf2540d7..78a87d31463e98b0 100644
> --- a/drivers/clk/at91/pmc.h
> +++ b/drivers/clk/at91/pmc.h
> @@ -117,7 +117,9 @@ struct at91_clk_pms {
> unsigned int parent;
> };
>
> +#undef field_get
> #define field_get(_mask, _reg) (((_reg) & (_mask)) >> (ffs(_mask) - 1))
> +#undef field_prep
> #define field_prep(_mask, _val) (((_val) << (ffs(_mask) - 1)) & (_mask))
>
> #define ndck(a, s) (a[s - 1].id + 1)
> --
> 2.43.0
>
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2025-10-27 20:37 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-27 18:41 [PATCH v5 00/23] Non-const bitfield helpers Geert Uytterhoeven
2025-10-27 18:41 ` [PATCH v5 01/23] clk: at91: pmc: #undef field_{get,prep}() before definition Geert Uytterhoeven
2025-10-27 20:36 ` Alexandre Belloni [this message]
2025-10-27 18:41 ` [PATCH v5 02/23] crypto: qat - #undef field_get() before local definition Geert Uytterhoeven
2025-10-27 18:41 ` [PATCH v5 03/23] EDAC/ie31200: " Geert Uytterhoeven
2025-10-27 18:41 ` [PATCH v5 04/23] gpio: aspeed: #undef field_{get,prep}() " Geert Uytterhoeven
2025-10-28 14:20 ` Bartosz Golaszewski
2025-10-27 18:41 ` [PATCH v5 05/23] iio: dac: ad3530r: #undef field_prep() " Geert Uytterhoeven
2025-10-27 18:41 ` [PATCH v5 06/23] iio: mlx90614: #undef field_{get,prep}() " Geert Uytterhoeven
2025-10-27 18:41 ` [PATCH v5 07/23] pinctrl: ma35: " Geert Uytterhoeven
2025-10-27 18:41 ` [PATCH v5 08/23] soc: renesas: rz-sysc: #undef field_get() " Geert Uytterhoeven
2025-10-27 18:41 ` [PATCH v5 09/23] ALSA: usb-audio: #undef field_{get,prep}() " Geert Uytterhoeven
2025-10-28 16:13 ` Takashi Iwai
2025-10-27 18:41 ` [PATCH -next v5 10/23] iio: imu: smi330: #undef field_{get,prep}() before definition Geert Uytterhoeven
2025-10-27 18:41 ` [PATCH v5 11/23] bitfield: Add non-constant field_{prep,get}() helpers Geert Uytterhoeven
2025-10-28 9:15 ` Andy Shevchenko
2025-10-27 18:41 ` [PATCH v5 12/23] clk: at91: Convert to common field_{get,prep}() helpers Geert Uytterhoeven
2025-10-27 18:41 ` [PATCH v5 13/23] crypto: qat - convert to common field_get() helper Geert Uytterhoeven
2025-10-27 18:41 ` [PATCH v5 14/23] EDAC/ie31200: Convert " Geert Uytterhoeven
2025-10-27 18:41 ` [PATCH v5 15/23] gpio: aspeed: Convert to common field_{get,prep}() helpers Geert Uytterhoeven
2025-10-27 18:41 ` [PATCH v5 16/23] iio: dac: Convert to common field_prep() helper Geert Uytterhoeven
2025-10-27 18:41 ` [PATCH v5 17/23] iio: mlx90614: Convert to common field_{get,prep}() helpers Geert Uytterhoeven
2025-10-27 18:41 ` [PATCH v5 18/23] pinctrl: ma35: " Geert Uytterhoeven
2025-10-27 18:41 ` [PATCH v5 19/23] soc: renesas: rz-sysc: Convert to common field_get() helper Geert Uytterhoeven
2025-10-27 18:41 ` [PATCH v5 20/23] ALSA: usb-audio: Convert to common field_{get,prep}() helpers Geert Uytterhoeven
2025-10-28 16:13 ` Takashi Iwai
2025-10-27 18:41 ` [PATCH -next v5 21/23] iio: imu: smi330: " Geert Uytterhoeven
2025-10-27 18:41 ` [PATCH v5 22/23] clk: renesas: Use bitfield helpers Geert Uytterhoeven
2025-10-27 18:41 ` [PATCH v5 23/23] soc: " Geert Uytterhoeven
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=20251027203640291d726b@mail.local \
--to=alexandre.belloni@bootlin.com \
--cc=Jianping.Shen@de.bosch.com \
--cc=Michael.Hennerich@analog.com \
--cc=andrew@codeconstruct.com.au \
--cc=andy@kernel.org \
--cc=biju.das.jz@bp.renesas.com \
--cc=bp@alien8.de \
--cc=brgl@bgdev.pl \
--cc=claudiu.beznea@tuxon.dev \
--cc=cmo@melexis.com \
--cc=davem@davemloft.net \
--cc=david.laight.linux@gmail.com \
--cc=demonsingur@gmail.com \
--cc=dlechner@baylibre.com \
--cc=elder@ieee.org \
--cc=geert+renesas@glider.be \
--cc=giovanni.cabiddu@intel.com \
--cc=herbert@gondor.apana.org.au \
--cc=jbaron@akamai.com \
--cc=jic23@kernel.org \
--cc=joel@jms.id.au \
--cc=johannes@sipsolutions.net \
--cc=kimseer.paller@analog.com \
--cc=kuba@kernel.org \
--cc=lars@metafoo.de \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-edac@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=mailhol.vincent@wanadoo.fr \
--cc=mturquette@baylibre.com \
--cc=nicolas.ferre@microchip.com \
--cc=nuno.sa@analog.com \
--cc=perex@perex.cz \
--cc=qat-linux@intel.com \
--cc=richard.genoud@bootlin.com \
--cc=sboyd@kernel.org \
--cc=schung@nuvoton.com \
--cc=tiwai@suse.com \
--cc=tony.luck@intel.com \
--cc=ychuang3@nuvoton.com \
--cc=yury.norov@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).