From: Jani Nikula <jani.nikula@intel.com>
To: "Michał Grzelak" <michal.grzelak@intel.com>
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
ville.syrjala@linux.intel.com
Subject: Re: [PATCH 2/4] drm/i915/display: add struct intel_irq_regs and use it
Date: Tue, 05 May 2026 12:31:00 +0300 [thread overview]
Message-ID: <123c1c11c24a2d52f57f07589320ddd1a30e97fb@intel.com> (raw)
In-Reply-To: <4467f546-984f-0367-1356-38374c6ae2b9@intel.com>
On Tue, 05 May 2026, Michał Grzelak <michal.grzelak@intel.com> wrote:
> On Wed, 8 Apr 2026, Jani Nikula wrote:
>> -#define GEN8_DE_PIPE_IRQ_REGS(pipe) I915_IRQ_REGS(GEN8_DE_PIPE_IMR(pipe), \
>> - GEN8_DE_PIPE_IER(pipe), \
>> - GEN8_DE_PIPE_IIR(pipe))
>> +#define GEN8_DE_PIPE_IRQ_REGS(pipe) INTEL_IRQ_REGS(GEN8_DE_PIPE_IMR(pipe), \
>> + GEN8_DE_PIPE_IER(pipe), \
>> + GEN8_DE_PIPE_IIR(pipe))
>
> Should I send a patch with s/pipe/_pipe applied to
> GEN8_DE_PIPE_IRQ_REGS()? In case it is just a nit from checkpatch:
s/pipe/_pipe/ doesn't help with the checkpatch complaint about macro
argument reuse.
Basically this means something like
GEN8_DE_PIPE_IRQ_REGS(foo())
leads to foo() being called three times, in unspecified order.
For the register macros we generally don't care, and they're only used
in a fairly limited manner. To make them safe against macro argument
reuse requires a code block like ({ enum pipe _pipe = (pipe); ... }) and
that'll never be a constant expression.
> Reviewed-by: Michał Grzelak <michal.grzelak@intel.com>
Thanks,
Jani.
--
Jani Nikula, Intel
next prev parent reply other threads:[~2026-05-05 9:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-08 13:15 [PATCH 0/4] drm/i915/display: start switching to display specific reg types Jani Nikula
2026-04-08 13:15 ` [PATCH 1/4] drm/i915/display: add typedef for intel_reg_t and use it Jani Nikula
2026-05-04 22:29 ` Michał Grzelak
2026-05-05 9:21 ` Jani Nikula
2026-04-08 13:15 ` [PATCH 2/4] drm/i915/display: add struct intel_irq_regs " Jani Nikula
2026-05-04 22:31 ` Michał Grzelak
2026-05-05 9:31 ` Jani Nikula [this message]
2026-04-08 13:15 ` [PATCH 3/4] drm/i915/display: add struct intel_error_regs " Jani Nikula
2026-05-04 22:31 ` Michał Grzelak
2026-04-08 13:15 ` [PATCH 4/4] drm/i915/display: define and use intel_reg_{offset, equal, valid}() helpers Jani Nikula
2026-05-04 22:32 ` Michał Grzelak
2026-04-08 13:22 ` ✗ CI.checkpatch: warning for drm/i915/display: start switching to display specific reg types Patchwork
2026-04-08 13:25 ` ✗ CI.KUnit: failure " Patchwork
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=123c1c11c24a2d52f57f07589320ddd1a30e97fb@intel.com \
--to=jani.nikula@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=michal.grzelak@intel.com \
--cc=ville.syrjala@linux.intel.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 read-only IMAP folder(s) and NNTP newsgroup(s).