From: "Brigham Campbell" <me@brighamcampbell.com>
To: "Diogo Ivo" <diogo.ivo@tecnico.ulisboa.pt>,
"Doug Anderson" <dianders@chromium.org>
Cc: <tejasvipin76@gmail.com>, <skhan@linuxfoundation.org>,
<linux-kernel-mentees@lists.linux.dev>,
<dri-devel@lists.freedesktop.org>, <linux-doc@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
"Neil Armstrong" <neil.armstrong@linaro.org>,
"Jessica Zhang" <jessica.zhang@oss.qualcomm.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>
Subject: Re: [PATCH v4 2/4] drm/panel: jdi-lpm102a188a: Fix bug and clean up driver
Date: Sun, 20 Jul 2025 01:50:43 -0600 [thread overview]
Message-ID: <DBGPVFN5DTGU.5UTP35ALYS2Q@brighamcampbell.com> (raw)
In-Reply-To: <f0d300fc-0141-4eab-a888-d1d32778f5de@tecnico.ulisboa.pt>
On Sat Jul 19, 2025 at 11:10 AM MDT, Diogo Ivo wrote:
>> nit: can just be this:
>>
>> struct mipi_dsi_multi_context dsi_ctx = {};
>
> I am not an expert here but I was under the impression that this is only
> valid with C23 while the kernel is written in C11. Is there something I
> am missing?
>
> Diogo
You're right, C23 was the first standard to bless the usage of the empty
initializer, ` = {};`, but if I'm right, it's been a GNU extension long
before C11. At risk of being pedantic, I'll draw attention to line 580
of the kernel's root Makefile:
KBUILD_CFLAGS += -std=gnu11
The kernel is technically written in the GNU variant of C11, extensions
and all. In fact, the first patch of this series uses optional variadic
macro arguments, which aren't a part of any official C standard as far
as I'm aware.
In any case, a simple grep for some forms of the empty initializer shows
usages all over the drm subsystem.
That said, I don't know if GNU extensions are formally documented or
where one would look for that information. Importantly, I am by far the
junior as far as kernel coding is concerned. I yield to your experience
and I'm happy to change this initialization in v6 if that's best.
Cheers,
Brigham
next prev parent reply other threads:[~2025-07-20 7:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-17 16:40 [PATCH v3 0/4] drm: Fix bug in panel driver, update MIPI support macros Brigham Campbell
2025-07-17 16:40 ` [PATCH v4 1/4] drm: Create mipi_dsi_dual macro Brigham Campbell
2025-07-18 16:10 ` Doug Anderson
2025-07-18 17:17 ` Brigham Campbell
2025-07-18 20:32 ` Doug Anderson
2025-07-17 16:40 ` [PATCH v4 2/4] drm/panel: jdi-lpm102a188a: Fix bug and clean up driver Brigham Campbell
2025-07-18 10:43 ` Diogo Ivo
2025-07-18 16:11 ` Doug Anderson
2025-07-19 17:10 ` Diogo Ivo
2025-07-20 7:50 ` Brigham Campbell [this message]
2025-07-20 11:19 ` Diogo Ivo
2025-07-21 15:46 ` Doug Anderson
2025-07-17 16:40 ` [PATCH v4 3/4] drm: Remove unused MIPI write seq and chatty functions Brigham Campbell
2025-07-17 16:40 ` [PATCH v4 4/4] drm: docs: Update task from drm TODO list Brigham Campbell
2025-07-17 18:41 ` [PATCH v3 0/4] drm: Fix bug in panel driver, update MIPI support macros Brigham Campbell
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=DBGPVFN5DTGU.5UTP35ALYS2Q@brighamcampbell.com \
--to=me@brighamcampbell.com \
--cc=airlied@gmail.com \
--cc=dianders@chromium.org \
--cc=diogo.ivo@tecnico.ulisboa.pt \
--cc=dri-devel@lists.freedesktop.org \
--cc=jessica.zhang@oss.qualcomm.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel-mentees@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=simona@ffwll.ch \
--cc=skhan@linuxfoundation.org \
--cc=tejasvipin76@gmail.com \
--cc=tzimmermann@suse.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.