mbox series

[00/17] drm/i915: switch to kernel fixed size types

Message ID cover.1547629303.git.jani.nikula@intel.com (mailing list archive)
Headers show
Series drm/i915: switch to kernel fixed size types | expand

Message

Jani Nikula Jan. 16, 2019, 9:15 a.m. UTC
Hi all -

I haven't cared all that much about using C99 fixed size types (uint32_t
etc.) in the driver in addition to kernel types, as long as only one or
the other is used in the same struct/function/file. But the increasing
mixed use crossed some OCD threshold the other day. It gets ugly, and
sets a precedent that mixed use is fine.

Let's switch to kernel types exclusively, shall we?

Each path in the series is independent of the others, and it's mostly
one patch per file, apart from the first patch which gathers all the
isolated uses into one patch. I've tried to order the series from least
to most likely to cause conflicts with in-flight work per gut feeling.

Please holler if you think some of these patches need to wait for some
other, more important stuff to land first. This was mostly scripted,
with a few manual edits on top, so pretty quick to redo on top later.

After most of these have landed, I intend to drop PREFER_KERNEL_TYPES
from the checkpatch ignore list, and enforce.

BR,
Jani.


Jani Nikula (17):
  drm/i915: small isolated c99 types to kernel types switch
  drm/i915/crt: switch to kernel types
  drm/i915/sdvo: switch to kernel types
  drm/i915/lspcon: switch to kernel types
  drm/i915/debugfs: switch to kernel types
  drm/i915/irq: switch to kernel types
  drm/i915/cdclk: switch to kernel types
  drm/i915/dpll_mgr: switch to kernel types
  drm/i915/dp: switch to kernel types
  drm/i915/sprite: switch to kernel types
  drm/i915/color: switch to kernel types
  drm/i915/pm: switch to kernel types
  drm/i915/ddi: switch to kernel types
  drm/i915/csr: switch to kernel types
  drm/i915/display: switch to kernel types
  drm/i915/i915_drv.h: switch to kernel types
  drm/i915/intel_drv.h: switch to kernel types

 drivers/gpu/drm/i915/i915_debugfs.c           |  22 +-
 drivers/gpu/drm/i915/i915_drv.h               | 158 ++++++-------
 drivers/gpu/drm/i915/i915_gem.c               |  14 +-
 drivers/gpu/drm/i915/i915_gem_fence_reg.c     |   8 +-
 drivers/gpu/drm/i915/i915_gpu_error.c         |  10 +-
 drivers/gpu/drm/i915/i915_irq.c               |  82 +++----
 drivers/gpu/drm/i915/i915_perf.c              |   2 +-
 drivers/gpu/drm/i915/i915_reg.h               |   4 +-
 drivers/gpu/drm/i915/intel_atomic.c           |   4 +-
 drivers/gpu/drm/i915/intel_atomic_plane.c     |   4 +-
 drivers/gpu/drm/i915/intel_cdclk.c            |  40 ++--
 drivers/gpu/drm/i915/intel_color.c            |  40 ++--
 drivers/gpu/drm/i915/intel_crt.c              |  22 +-
 drivers/gpu/drm/i915/intel_csr.c              |  68 +++---
 drivers/gpu/drm/i915/intel_ddi.c              |  52 ++---
 drivers/gpu/drm/i915/intel_display.c          | 104 ++++-----
 drivers/gpu/drm/i915/intel_dp.c               | 142 ++++++------
 drivers/gpu/drm/i915/intel_dp_link_training.c |  32 +--
 drivers/gpu/drm/i915/intel_dp_mst.c           |   2 +-
 drivers/gpu/drm/i915/intel_dpio_phy.c         |  18 +-
 drivers/gpu/drm/i915/intel_dpll_mgr.c         | 145 ++++++------
 drivers/gpu/drm/i915/intel_dpll_mgr.h         |  53 +++--
 drivers/gpu/drm/i915/intel_drv.h              |  94 ++++----
 drivers/gpu/drm/i915/intel_engine_cs.c        |  12 +-
 drivers/gpu/drm/i915/intel_fbc.c              |   2 +-
 drivers/gpu/drm/i915/intel_fifo_underrun.c    |  12 +-
 drivers/gpu/drm/i915/intel_hdcp.c             |   4 +-
 drivers/gpu/drm/i915/intel_lrc.c              |   2 +-
 drivers/gpu/drm/i915/intel_lspcon.c           |  20 +-
 drivers/gpu/drm/i915/intel_pipe_crc.c         |  18 +-
 drivers/gpu/drm/i915/intel_pm.c               | 213 +++++++++---------
 drivers/gpu/drm/i915/intel_psr.c              |   6 +-
 drivers/gpu/drm/i915/intel_ringbuffer.h       |   2 +-
 drivers/gpu/drm/i915/intel_runtime_pm.c       |  20 +-
 drivers/gpu/drm/i915/intel_sdvo.c             |  78 +++----
 drivers/gpu/drm/i915/intel_sprite.c           |  60 ++---
 36 files changed, 782 insertions(+), 787 deletions(-)

Comments

Chris Wilson Jan. 16, 2019, 9:22 a.m. UTC | #1
Quoting Jani Nikula (2019-01-16 09:15:18)
> Hi all -
> 
> I haven't cared all that much about using C99 fixed size types (uint32_t
> etc.) in the driver in addition to kernel types, as long as only one or
> the other is used in the same struct/function/file. But the increasing
> mixed use crossed some OCD threshold the other day. It gets ugly, and
> sets a precedent that mixed use is fine.
> 
> Let's switch to kernel types exclusively, shall we?
> 
> Each path in the series is independent of the others, and it's mostly
> one patch per file, apart from the first patch which gathers all the
> isolated uses into one patch. I've tried to order the series from least
> to most likely to cause conflicts with in-flight work per gut feeling.
> 
> Please holler if you think some of these patches need to wait for some
> other, more important stuff to land first. This was mostly scripted,
> with a few manual edits on top, so pretty quick to redo on top later.
> 
> After most of these have landed, I intend to drop PREFER_KERNEL_TYPES
> from the checkpatch ignore list, and enforce.
> 
> BR,
> Jani.
> 
> 
> Jani Nikula (17):
>   drm/i915: small isolated c99 types to kernel types switch
>   drm/i915/crt: switch to kernel types
>   drm/i915/sdvo: switch to kernel types
>   drm/i915/lspcon: switch to kernel types
>   drm/i915/debugfs: switch to kernel types
>   drm/i915/irq: switch to kernel types
>   drm/i915/cdclk: switch to kernel types
>   drm/i915/dpll_mgr: switch to kernel types
>   drm/i915/dp: switch to kernel types
>   drm/i915/sprite: switch to kernel types
>   drm/i915/color: switch to kernel types
>   drm/i915/pm: switch to kernel types
>   drm/i915/ddi: switch to kernel types
>   drm/i915/csr: switch to kernel types
>   drm/i915/display: switch to kernel types
>   drm/i915/i915_drv.h: switch to kernel types
>   drm/i915/intel_drv.h: switch to kernel types

Acked-by: Chris Wilson <chris@chris-wilson.co.uk>

I've reviewed the patches that touch the code I work with most, leaving
the display chunks which have the majority preference for stdint.
-Chris
Tvrtko Ursulin Jan. 16, 2019, 9:26 a.m. UTC | #2
On 16/01/2019 09:15, Jani Nikula wrote:
> Hi all -
> 
> I haven't cared all that much about using C99 fixed size types (uint32_t
> etc.) in the driver in addition to kernel types, as long as only one or
> the other is used in the same struct/function/file. But the increasing
> mixed use crossed some OCD threshold the other day. It gets ugly, and
> sets a precedent that mixed use is fine.
> 
> Let's switch to kernel types exclusively, shall we?

Acked-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Holler if you need reviews as well.

Regards,

Tvrtko

> Each path in the series is independent of the others, and it's mostly
> one patch per file, apart from the first patch which gathers all the
> isolated uses into one patch. I've tried to order the series from least
> to most likely to cause conflicts with in-flight work per gut feeling.
> 
> Please holler if you think some of these patches need to wait for some
> other, more important stuff to land first. This was mostly scripted,
> with a few manual edits on top, so pretty quick to redo on top later.
> 
> After most of these have landed, I intend to drop PREFER_KERNEL_TYPES
> from the checkpatch ignore list, and enforce.
> 
> BR,
> Jani.
> 
> 
> Jani Nikula (17):
>    drm/i915: small isolated c99 types to kernel types switch
>    drm/i915/crt: switch to kernel types
>    drm/i915/sdvo: switch to kernel types
>    drm/i915/lspcon: switch to kernel types
>    drm/i915/debugfs: switch to kernel types
>    drm/i915/irq: switch to kernel types
>    drm/i915/cdclk: switch to kernel types
>    drm/i915/dpll_mgr: switch to kernel types
>    drm/i915/dp: switch to kernel types
>    drm/i915/sprite: switch to kernel types
>    drm/i915/color: switch to kernel types
>    drm/i915/pm: switch to kernel types
>    drm/i915/ddi: switch to kernel types
>    drm/i915/csr: switch to kernel types
>    drm/i915/display: switch to kernel types
>    drm/i915/i915_drv.h: switch to kernel types
>    drm/i915/intel_drv.h: switch to kernel types
> 
>   drivers/gpu/drm/i915/i915_debugfs.c           |  22 +-
>   drivers/gpu/drm/i915/i915_drv.h               | 158 ++++++-------
>   drivers/gpu/drm/i915/i915_gem.c               |  14 +-
>   drivers/gpu/drm/i915/i915_gem_fence_reg.c     |   8 +-
>   drivers/gpu/drm/i915/i915_gpu_error.c         |  10 +-
>   drivers/gpu/drm/i915/i915_irq.c               |  82 +++----
>   drivers/gpu/drm/i915/i915_perf.c              |   2 +-
>   drivers/gpu/drm/i915/i915_reg.h               |   4 +-
>   drivers/gpu/drm/i915/intel_atomic.c           |   4 +-
>   drivers/gpu/drm/i915/intel_atomic_plane.c     |   4 +-
>   drivers/gpu/drm/i915/intel_cdclk.c            |  40 ++--
>   drivers/gpu/drm/i915/intel_color.c            |  40 ++--
>   drivers/gpu/drm/i915/intel_crt.c              |  22 +-
>   drivers/gpu/drm/i915/intel_csr.c              |  68 +++---
>   drivers/gpu/drm/i915/intel_ddi.c              |  52 ++---
>   drivers/gpu/drm/i915/intel_display.c          | 104 ++++-----
>   drivers/gpu/drm/i915/intel_dp.c               | 142 ++++++------
>   drivers/gpu/drm/i915/intel_dp_link_training.c |  32 +--
>   drivers/gpu/drm/i915/intel_dp_mst.c           |   2 +-
>   drivers/gpu/drm/i915/intel_dpio_phy.c         |  18 +-
>   drivers/gpu/drm/i915/intel_dpll_mgr.c         | 145 ++++++------
>   drivers/gpu/drm/i915/intel_dpll_mgr.h         |  53 +++--
>   drivers/gpu/drm/i915/intel_drv.h              |  94 ++++----
>   drivers/gpu/drm/i915/intel_engine_cs.c        |  12 +-
>   drivers/gpu/drm/i915/intel_fbc.c              |   2 +-
>   drivers/gpu/drm/i915/intel_fifo_underrun.c    |  12 +-
>   drivers/gpu/drm/i915/intel_hdcp.c             |   4 +-
>   drivers/gpu/drm/i915/intel_lrc.c              |   2 +-
>   drivers/gpu/drm/i915/intel_lspcon.c           |  20 +-
>   drivers/gpu/drm/i915/intel_pipe_crc.c         |  18 +-
>   drivers/gpu/drm/i915/intel_pm.c               | 213 +++++++++---------
>   drivers/gpu/drm/i915/intel_psr.c              |   6 +-
>   drivers/gpu/drm/i915/intel_ringbuffer.h       |   2 +-
>   drivers/gpu/drm/i915/intel_runtime_pm.c       |  20 +-
>   drivers/gpu/drm/i915/intel_sdvo.c             |  78 +++----
>   drivers/gpu/drm/i915/intel_sprite.c           |  60 ++---
>   36 files changed, 782 insertions(+), 787 deletions(-)
>
Ville Syrjala Jan. 16, 2019, 5:05 p.m. UTC | #3
On Wed, Jan 16, 2019 at 11:15:18AM +0200, Jani Nikula wrote:
> Hi all -
> 
> I haven't cared all that much about using C99 fixed size types (uint32_t
> etc.) in the driver in addition to kernel types, as long as only one or
> the other is used in the same struct/function/file. But the increasing
> mixed use crossed some OCD threshold the other day. It gets ugly, and
> sets a precedent that mixed use is fine.
> 
> Let's switch to kernel types exclusively, shall we?
> 
> Each path in the series is independent of the others, and it's mostly
> one patch per file, apart from the first patch which gathers all the
> isolated uses into one patch. I've tried to order the series from least
> to most likely to cause conflicts with in-flight work per gut feeling.
> 
> Please holler if you think some of these patches need to wait for some
> other, more important stuff to land first. This was mostly scripted,
> with a few manual edits on top, so pretty quick to redo on top later.
> 
> After most of these have landed, I intend to drop PREFER_KERNEL_TYPES
> from the checkpatch ignore list, and enforce.

Did a really quick scan through and the pattern matcher in the
brain didn't complain, so seems good enough to me.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> 
> BR,
> Jani.
> 
> 
> Jani Nikula (17):
>   drm/i915: small isolated c99 types to kernel types switch
>   drm/i915/crt: switch to kernel types
>   drm/i915/sdvo: switch to kernel types
>   drm/i915/lspcon: switch to kernel types
>   drm/i915/debugfs: switch to kernel types
>   drm/i915/irq: switch to kernel types
>   drm/i915/cdclk: switch to kernel types
>   drm/i915/dpll_mgr: switch to kernel types
>   drm/i915/dp: switch to kernel types
>   drm/i915/sprite: switch to kernel types
>   drm/i915/color: switch to kernel types
>   drm/i915/pm: switch to kernel types
>   drm/i915/ddi: switch to kernel types
>   drm/i915/csr: switch to kernel types
>   drm/i915/display: switch to kernel types
>   drm/i915/i915_drv.h: switch to kernel types
>   drm/i915/intel_drv.h: switch to kernel types
> 
>  drivers/gpu/drm/i915/i915_debugfs.c           |  22 +-
>  drivers/gpu/drm/i915/i915_drv.h               | 158 ++++++-------
>  drivers/gpu/drm/i915/i915_gem.c               |  14 +-
>  drivers/gpu/drm/i915/i915_gem_fence_reg.c     |   8 +-
>  drivers/gpu/drm/i915/i915_gpu_error.c         |  10 +-
>  drivers/gpu/drm/i915/i915_irq.c               |  82 +++----
>  drivers/gpu/drm/i915/i915_perf.c              |   2 +-
>  drivers/gpu/drm/i915/i915_reg.h               |   4 +-
>  drivers/gpu/drm/i915/intel_atomic.c           |   4 +-
>  drivers/gpu/drm/i915/intel_atomic_plane.c     |   4 +-
>  drivers/gpu/drm/i915/intel_cdclk.c            |  40 ++--
>  drivers/gpu/drm/i915/intel_color.c            |  40 ++--
>  drivers/gpu/drm/i915/intel_crt.c              |  22 +-
>  drivers/gpu/drm/i915/intel_csr.c              |  68 +++---
>  drivers/gpu/drm/i915/intel_ddi.c              |  52 ++---
>  drivers/gpu/drm/i915/intel_display.c          | 104 ++++-----
>  drivers/gpu/drm/i915/intel_dp.c               | 142 ++++++------
>  drivers/gpu/drm/i915/intel_dp_link_training.c |  32 +--
>  drivers/gpu/drm/i915/intel_dp_mst.c           |   2 +-
>  drivers/gpu/drm/i915/intel_dpio_phy.c         |  18 +-
>  drivers/gpu/drm/i915/intel_dpll_mgr.c         | 145 ++++++------
>  drivers/gpu/drm/i915/intel_dpll_mgr.h         |  53 +++--
>  drivers/gpu/drm/i915/intel_drv.h              |  94 ++++----
>  drivers/gpu/drm/i915/intel_engine_cs.c        |  12 +-
>  drivers/gpu/drm/i915/intel_fbc.c              |   2 +-
>  drivers/gpu/drm/i915/intel_fifo_underrun.c    |  12 +-
>  drivers/gpu/drm/i915/intel_hdcp.c             |   4 +-
>  drivers/gpu/drm/i915/intel_lrc.c              |   2 +-
>  drivers/gpu/drm/i915/intel_lspcon.c           |  20 +-
>  drivers/gpu/drm/i915/intel_pipe_crc.c         |  18 +-
>  drivers/gpu/drm/i915/intel_pm.c               | 213 +++++++++---------
>  drivers/gpu/drm/i915/intel_psr.c              |   6 +-
>  drivers/gpu/drm/i915/intel_ringbuffer.h       |   2 +-
>  drivers/gpu/drm/i915/intel_runtime_pm.c       |  20 +-
>  drivers/gpu/drm/i915/intel_sdvo.c             |  78 +++----
>  drivers/gpu/drm/i915/intel_sprite.c           |  60 ++---
>  36 files changed, 782 insertions(+), 787 deletions(-)
> 
> -- 
> 2.20.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula Jan. 17, 2019, 7:29 a.m. UTC | #4
On Wed, 16 Jan 2019, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> On Wed, Jan 16, 2019 at 11:15:18AM +0200, Jani Nikula wrote:
>> Hi all -
>> 
>> I haven't cared all that much about using C99 fixed size types (uint32_t
>> etc.) in the driver in addition to kernel types, as long as only one or
>> the other is used in the same struct/function/file. But the increasing
>> mixed use crossed some OCD threshold the other day. It gets ugly, and
>> sets a precedent that mixed use is fine.
>> 
>> Let's switch to kernel types exclusively, shall we?
>> 
>> Each path in the series is independent of the others, and it's mostly
>> one patch per file, apart from the first patch which gathers all the
>> isolated uses into one patch. I've tried to order the series from least
>> to most likely to cause conflicts with in-flight work per gut feeling.
>> 
>> Please holler if you think some of these patches need to wait for some
>> other, more important stuff to land first. This was mostly scripted,
>> with a few manual edits on top, so pretty quick to redo on top later.
>> 
>> After most of these have landed, I intend to drop PREFER_KERNEL_TYPES
>> from the checkpatch ignore list, and enforce.
>
> Did a really quick scan through and the pattern matcher in the
> brain didn't complain, so seems good enough to me.
>
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Thanks for the reviews Chris, Ville & José! I pushed the the patches
listed below for starters. Started small.

While I took care with the r-b's, I failed to record the acks from Chris
and Tvrtko. :( Apologies.

BR,
Jani.

Pushed now:
>>   drm/i915: small isolated c99 types to kernel types switch
>>   drm/i915/crt: switch to kernel types
>>   drm/i915/lspcon: switch to kernel types
>>   drm/i915/debugfs: switch to kernel types
>>   drm/i915/irq: switch to kernel types
>>   drm/i915/cdclk: switch to kernel types
>>   drm/i915/dpll_mgr: switch to kernel types
>>   drm/i915/dp: switch to kernel types
>>   drm/i915/sprite: switch to kernel types