From: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
To: Jani Nikula <jani.nikula@linux.intel.com>
Cc: David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Sasha Finkelstein <k@chaosmail.tech>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
Andrzej Hajda <andrzej.hajda@intel.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
Robert Foss <rfoss@kernel.org>,
dri-devel@lists.freedesktop.org, asahi@lists.linux.dev,
linux-aspeed@lists.ozlabs.org,
linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev,
linux-riscv@lists.infradead.org, etnaviv@lists.freedesktop.org,
linux-samsung-soc@vger.kernel.org,
intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
imagination@lists.freedesktop.org, linux-mips@vger.kernel.org,
lima@lists.freedesktop.org, linux-mediatek@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org,
linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org,
nouveau@lists.freedesktop.org, virtualization@lists.linux.dev,
spice-devel@lists.freedesktop.org,
linux-renesas-soc@vger.kernel.org,
linux-rockchip@lists.infradead.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-sunxi@lists.linux.dev, linux-tegra@vger.kernel.org
Subject: Re: [PATCH v1 9/9] drm: Unify coding style for *_device_id arrays
Date: Wed, 18 Nov 2026 15:06:41 +0100 [thread overview]
Message-ID: <av2rKJQ0AKU9CFZI@monoceros> (raw)
In-Reply-To: <7692c160e418e7ad0528739fcc879b11fbac8ab0@intel.com>
[-- Attachment #1.1: Type: text/plain, Size: 2332 bytes --]
Hello Jani,
On Wed, Nov 18, 2026 at 03:27:40PM +0200, Jani Nikula wrote:
> > [...]
> > drivers/gpu/ipu-v3/ipu-common.c | 8 +-
> > drivers/gpu/ipu-v3/ipu-pre.c | 4 +-
> > drivers/gpu/ipu-v3/ipu-prg.c | 4 +-
> > 254 files changed, 1155 insertions(+), 940 deletions(-)
>
> How do you expect a patch of this size be merged?
Using b4 am :-) Honestly, in the cover letter I wrote about an immutable
branch and offered to rebase to 7.4-rc1. When trying to apply this
series on top ov 7.4-rc1 there are only 6 conflicts (1x modify/delete
and 5x content); these are all not so hard to resolve (and even dropping
the respective hunks (i.e. resolving using `git checkout HEAD`) is fine
for me.)
> > diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
> > index 84a7dc6ab5db..faceb3de4fa3 100644
> > --- a/drivers/gpu/drm/i915/i915_pci.c
> > +++ b/drivers/gpu/drm/i915/i915_pci.c
> > @@ -870,7 +870,7 @@ static const struct pci_device_id pciidlist[] = {
> > INTEL_ATS_M_IDS(INTEL_VGA_DEVICE, &ats_m_info),
> > INTEL_ARL_IDS(INTEL_VGA_DEVICE, &mtl_info),
> > INTEL_MTL_IDS(INTEL_VGA_DEVICE, &mtl_info),
> > - {}
> > + { }
>
> Personally, I would *always* use {} instead of { }, and would rather not
> change.
>
> Across the tree, {} is slightly more common than { }. IMO changing them
> is pointless churn.
It depends on how you count. My statistic looks as follows (on top of
next-20261117):
$ git grep -l device_id | xargs -n 1 perl -g -n -e 'print "$1\n" if m/device_id\s*[a-zA-Z_0-9]*\[\]\s*=\s*{(?:\s*{[^}]*},\s*({\s*}))/' | sort | uniq -c
2 }
2 {
6 { }
2598 { }
1262 {}
So over all *_device_id { } is more common by a factor of > 2. This
series fixes one { } and reduces the number of {} by 37. For only
pci_device_id it's:
$ git grep -l pci_device_id | xargs -n 1 perl -g -n -e 'print "$1\n" if m/pci_device_id\s*[a-zA-Z_0-9]*\[\]\s*=\s*{(?:\s*{[^}]*},\s*({\s*}))/' | sort | uniq -c
159 { }
32 {}
Without the context of an array initializer there are many empty
code blocks (function bodys or `do {} while (0)`), empty dt nodes, and
{} in Rust code, which IMHO have to be considered off-topic for this
statistic.
Best regards
Uwe
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
prev parent reply other threads:[~2026-11-18 14:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 12:08 [PATCH v1 0/9] drm: Improvements around device-id arrays Uwe Kleine-König
2026-11-18 12:08 ` [PATCH v1 9/9] drm: Unify coding style for *_device_id arrays Uwe Kleine-König
2026-11-18 13:27 ` Jani Nikula
2026-11-18 14:06 ` Uwe Kleine-König [this message]
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=av2rKJQ0AKU9CFZI@monoceros \
--to=u.kleine-koenig@baylibre.com \
--cc=airlied@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=asahi@lists.linux.dev \
--cc=dri-devel@lists.freedesktop.org \
--cc=etnaviv@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=imagination@lists.freedesktop.org \
--cc=imx@lists.linux.dev \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=k@chaosmail.tech \
--cc=lima@lists.freedesktop.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=linux-sunxi@lists.linux.dev \
--cc=linux-tegra@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=nouveau@lists.freedesktop.org \
--cc=rfoss@kernel.org \
--cc=simona@ffwll.ch \
--cc=spice-devel@lists.freedesktop.org \
--cc=tzimmermann@suse.de \
--cc=virtualization@lists.linux.dev \
/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®