Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
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 1/4] drm/i915/display: add typedef for intel_reg_t and use it
Date: Tue, 05 May 2026 12:21:55 +0300	[thread overview]
Message-ID: <09d18b0e3beae5c89a9bfd1b3f32a36507cb45d3@intel.com> (raw)
In-Reply-To: <8d34455b-8156-76c3-97a3-29f943650230@intel.com>

On Tue, 05 May 2026, Michał Grzelak <michal.grzelak@intel.com> wrote:
> On Wed, 8 Apr 2026, Jani Nikula wrote:
>> diff --git a/drivers/gpu/drm/i915/display/intel_display_reg_defs.h b/drivers/gpu/drm/i915/display/intel_display_reg_defs.h
>> index 175334b41bba..cb46863693cd 100644
>> --- a/drivers/gpu/drm/i915/display/intel_display_reg_defs.h
>> +++ b/drivers/gpu/drm/i915/display/intel_display_reg_defs.h
>> @@ -8,6 +8,8 @@
>>
>> #include "i915_reg_defs.h"
>>
>> +typedef i915_reg_t intel_reg_t;
>> +
>
> Is there any reason why checkpatch encourages to refrain from adding new
> typedefs? This seems like a well justified case.

Typedefs are overall discouraged in the kernel per coding style. The
original was added for type safety, as we had mistakes with plain
integer register offsets. Could've been struct i915_reg too, but here we
are.

> Reviewed-by: Michał Grzelak <michal.grzelak@intel.com>

Thanks,
Jani.


-- 
Jani Nikula, Intel

  reply	other threads:[~2026-05-05  9:22 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 [this message]
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
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=09d18b0e3beae5c89a9bfd1b3f32a36507cb45d3@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