From: Mark Brown <broonie@kernel.org>
To: "Yury Norov (NVIDIA)" <yury.norov@gmail.com>
Cc: "Linus Torvalds" <torvalds@linux-foundation.org>,
"Linus Walleij" <linus.walleij@linaro.org>,
"Nicolas Frattaroli" <nicolas.frattaroli@collabora.com>,
"Sandy Huang" <hjc@rock-chips.com>,
"Heiko Stübner" <heiko@sntech.de>,
"Andy Yan" <andy.yan@rock-chips.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Shreeya Patel" <shreeya.patel@collabora.com>,
"Mauro Carvalho Chehab" <mchehab@kernel.org>,
"Jaehoon Chung" <jh80.chung@samsung.com>,
"Ulf Hansson" <ulf.hansson@linaro.org>,
"Nicolas Frattaroli" <frattaroli.nicolas@gmail.com>,
"Liam Girdwood" <lgirdwood@gmail.com>,
"Jaroslav Kysela" <perex@perex.cz>,
"Takashi Iwai" <tiwai@suse.com>,
dri-devel@lists.freedesktop.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-media@vger.kernel.org, kernel@collabora.com,
linux-mmc@vger.kernel.org, linux-sound@vger.kernel.org,
"Rasmus Villemoes" <linux@rasmusvillemoes.dk>
Subject: Re: [PATCH 11/21] drivers: don't use GENMASK() in FIELD_PREP_WM16()
Date: Mon, 27 Oct 2025 13:10:40 +0000 [thread overview]
Message-ID: <432db4d2-1f36-4531-b0b3-2a06ae682fd1@sirena.org.uk> (raw)
In-Reply-To: <20251025164023.308884-12-yury.norov@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1802 bytes --]
On Sat, Oct 25, 2025 at 12:40:10PM -0400, Yury Norov (NVIDIA) wrote:
> Recently added FIELD_PREP_WM16() in a few places uses GENMASK. It's
> confusing and may mislead readers. Switch to BITS() or FIRST_BITS()
> as appropriate.
This doesn't seem to line up with the actual change, you're not altering
FIELD_PREP_WM16() at all but rather altering things that use it.
As mentioned in submitting-patches.rst when submitting a patch series
you should supply a cover letter for that patch series which describes
the overall content of the series. This helps people understand what
they are looking at and how things fit together.
> ---
> drivers/gpu/drm/rockchip/rockchip_lvds.h | 2 +-
> drivers/gpu/drm/rockchip/rockchip_vop2_reg.c | 4 ++--
> drivers/media/platform/synopsys/hdmirx/snps_hdmirx.h | 4 ++--
> drivers/mmc/host/dw_mmc-rockchip.c | 4 ++--
> drivers/soc/rockchip/grf.c | 4 ++--
> sound/soc/rockchip/rockchip_i2s_tdm.h | 2 +-
> 6 files changed, 10 insertions(+), 10 deletions(-)
It doesn't help to send changes to unrelated subsystems in one patch
either...
> --- a/sound/soc/rockchip/rockchip_i2s_tdm.h
> +++ b/sound/soc/rockchip/rockchip_i2s_tdm.h
> @@ -287,7 +287,7 @@ enum {
> #define I2S_TDM_RXCR (0x0034)
> #define I2S_CLKDIV (0x0038)
>
> -#define HIWORD_UPDATE(v, h, l) (FIELD_PREP_WM16_CONST(GENMASK((h), (l)), (v)))
> +#define HIWORD_UPDATE(v, h, l) (FIELD_PREP_WM16_CONST(BITS((l), (h)), (v)))
This is adjusting the implementation of something that takes in h, l to
use l, h which if anything seems likely to introduce confusion, and
definitely feels well into bikeshed territory. I don't *super* care but
I'm having a hard time seeing the benefit.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2025-10-27 13:10 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-25 16:39 [PATCH 00/21] lib: add alternatives for GENMASK() Yury Norov (NVIDIA)
2025-10-25 16:40 ` [PATCH 01/21] arc: disasm: rename BITS() for FIELD() Yury Norov (NVIDIA)
2025-10-25 16:40 ` [PATCH 02/21] iwlwifi: drop unused BITS() Yury Norov (NVIDIA)
2025-10-25 16:40 ` [PATCH 03/21] select: rename BITS() to FDS_BITS() Yury Norov (NVIDIA)
2025-10-30 9:42 ` Jan Kara
2025-10-25 16:40 ` [PATCH 04/21] ALSA: rename BITS to R_BITS Yury Norov (NVIDIA)
2025-10-25 16:40 ` [PATCH 05/21] zlib: rename BITS() to LOWBITS() Yury Norov (NVIDIA)
2025-10-25 16:40 ` [PATCH 06/21] mfd: prepare to generalize BITS() macro Yury Norov (NVIDIA)
2025-10-25 16:40 ` [PATCH 07/21] bits: Add " Yury Norov (NVIDIA)
2025-10-25 16:40 ` [PATCH 08/21] mfd: drop local " Yury Norov (NVIDIA)
2025-10-25 16:40 ` [PATCH 09/21] bits: generalize BITMAP_{FIRST,LAST}_WORD_MASK Yury Norov (NVIDIA)
2025-10-25 16:40 ` [PATCH 10/21] i2c: nomadik: don't use GENMASK() Yury Norov (NVIDIA)
2025-10-25 16:40 ` [PATCH 11/21] drivers: don't use GENMASK() in FIELD_PREP_WM16() Yury Norov (NVIDIA)
2025-10-27 8:49 ` Jani Nikula
2025-10-27 12:21 ` Nicolas Frattaroli
2025-10-27 13:10 ` Mark Brown [this message]
2025-10-25 16:40 ` [PATCH 12/21] bitmap: don't use GENMASK() Yury Norov (NVIDIA)
2025-10-25 16:40 ` [PATCH 13/21] trace: " Yury Norov (NVIDIA)
2025-10-25 16:40 ` [PATCH 14/21] lib: 842: don't use GENMASK_ULL() Yury Norov (NVIDIA)
2025-10-25 16:40 ` [PATCH 15/21] bpf: don't use GENMASK() Yury Norov (NVIDIA)
2025-10-25 16:40 ` [PATCH 16/21] kcsan: " Yury Norov (NVIDIA)
2025-10-25 16:40 ` [PATCH 17/21] mm: " Yury Norov (NVIDIA)
2025-10-25 16:40 ` [PATCH 18/21] fprobe: " Yury Norov (NVIDIA)
2025-10-25 16:40 ` [PATCH 19/21] fs: " Yury Norov (NVIDIA)
2025-10-25 16:40 ` [PATCH 20/21] fortify-string: " Yury Norov (NVIDIA)
2025-10-25 16:40 ` [PATCH 21/21] Docs: add Functions parameters order section Yury Norov (NVIDIA)
2025-10-25 17:56 ` [PATCH 00/21] lib: add alternatives for GENMASK() Linus Torvalds
2025-11-26 9:07 ` Rasmus Villemoes
2025-11-26 10:38 ` david laight
2025-11-26 19:44 ` Linus Torvalds
2025-11-26 22:17 ` david laight
2025-11-26 23:47 ` Linus Torvalds
2025-11-27 9:37 ` david laight
2025-11-27 14:11 ` Nicolas Frattaroli
2025-11-27 17:29 ` Linus Torvalds
2025-11-27 18:51 ` david laight
2025-11-29 11:46 ` david laight
-- strict thread matches above, loose matches on Subject: below --
2025-10-25 16:28 Yury Norov (NVIDIA)
2025-10-25 16:32 ` [PATCH 11/21] drivers: don't use GENMASK() in FIELD_PREP_WM16() Yury Norov (NVIDIA)
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=432db4d2-1f36-4531-b0b3-2a06ae682fd1@sirena.org.uk \
--to=broonie@kernel.org \
--cc=airlied@gmail.com \
--cc=andy.yan@rock-chips.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=frattaroli.nicolas@gmail.com \
--cc=heiko@sntech.de \
--cc=hjc@rock-chips.com \
--cc=jh80.chung@samsung.com \
--cc=kernel@collabora.com \
--cc=lgirdwood@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-sound@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mchehab@kernel.org \
--cc=mripard@kernel.org \
--cc=nicolas.frattaroli@collabora.com \
--cc=perex@perex.cz \
--cc=shreeya.patel@collabora.com \
--cc=simona@ffwll.ch \
--cc=tiwai@suse.com \
--cc=torvalds@linux-foundation.org \
--cc=tzimmermann@suse.de \
--cc=ulf.hansson@linaro.org \
--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
all inboxes | Powered by JetHome®