public inbox for intel-xe@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Simon Richter <Simon.Richter@hogyros.de>, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 5/5] drm/xe: Normalize double-underscore include guards to single-underscore
Date: Mon, 30 Mar 2026 13:17:50 +0300	[thread overview]
Message-ID: <38244de644bab2d58ffd80f2f5d4b3d16940ac98@intel.com> (raw)
In-Reply-To: <e8dc2c15-e11b-4e2c-a645-04650cda218b@hogyros.de>

On Mon, 30 Mar 2026, Simon Richter <Simon.Richter@hogyros.de> wrote:
> Hi,
>
>>> Six headers use __XE_<NAME>_H__ (double-underscore prefix and suffix) as
>>> their include guards. Normalize them to the single-underscore _XE_<NAME>_H_
>>> convention used by the rest of the xe codebase.
>
> Single underscore followed by capital letter are reserved identifiers in C.

Well, ackshually...

"All identifiers that begin with an underscore and either an uppercase
letter or another underscore are always reserved for any use."

Even so:

$ git grep "#define __" | wc -l
21278

$ git grep "#define _[A-Z]" | wc -l
17886

The only question here is whether to be consistent or not about the
reserved identifier usage. ;)


BR,
Jani.

-- 
Jani Nikula, Intel

  reply	other threads:[~2026-03-30 10:17 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-17 21:57 [PATCH 0/5] drm/xe: Fix mismatched include guards in header files Shuicheng Lin
2026-03-17 21:57 ` [PATCH 1/5] drm/xe: Add missing include guards to unprotected headers Shuicheng Lin
2026-03-30  7:14   ` Gote, Nitin R
2026-03-17 21:57 ` [PATCH 2/5] drm/xe: Add missing _H to include guard suffixes Shuicheng Lin
2026-03-30  7:16   ` Gote, Nitin R
2026-03-17 21:57 ` [PATCH 3/5] drm/xe: Add missing trailing underscore to include guards Shuicheng Lin
2026-03-30  7:18   ` Gote, Nitin R
2026-03-17 21:57 ` [PATCH 4/5] drm/xe: Add missing leading " Shuicheng Lin
2026-03-30  7:19   ` Gote, Nitin R
2026-03-17 21:57 ` [PATCH 5/5] drm/xe: Normalize double-underscore include guards to single-underscore Shuicheng Lin
2026-03-30  7:21   ` Gote, Nitin R
2026-03-30  8:31     ` Simon Richter
2026-03-30 10:17       ` Jani Nikula [this message]
2026-03-31 16:31         ` Lin, Shuicheng
2026-03-17 22:06 ` ✗ CI.checkpatch: warning for drm/xe: Fix mismatched include guards in header files (rev2) Patchwork
2026-03-17 22:08 ` ✓ CI.KUnit: success " Patchwork
2026-03-17 22:51 ` ✓ Xe.CI.BAT: " Patchwork
2026-03-19  9:30 ` ✓ Xe.CI.FULL: " Patchwork
2026-04-06 16:07   ` Lin, Shuicheng

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=38244de644bab2d58ffd80f2f5d4b3d16940ac98@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=Simon.Richter@hogyros.de \
    --cc=intel-xe@lists.freedesktop.org \
    /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