Re: [PATCH 1/6] drm/i915: Introduce intel_ddi_dp_level.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2017-08-09 at 15:20 +0300, Jani Nikula wrote:
> On Tue, 08 Aug 2017, Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx> wrote:
> > +static uint32_t intel_ddi_dp_level(struct intel_dp *intel_dp)
> 
> Sorry to pick on specifically this patch when there continue to be
> offenders all over the place... 

don't be sorry.
I'm glad that you spotted this ;)

I'm always confused about this and try to get the closest one, although
I prefer the linux style u32.

> but shouldn't we prefer the kernel types
> over standard C types? Not that checkpatch is an authority here, but
> with --strict it complains about using e.g. uint32_t.

I went to
https://www.kernel.org/doc/html/v4.10/process/coding-style.html

"""
d. New types which are identical to standard C99 types, in certain
exceptional circumstances.

Although it would only take a short amount of time for the eyes and
brain to become accustomed to the standard types like uint32_t, some
people object to their use anyway.

Therefore, the Linux-specific u8/u16/u32/u64 types and their signed
equivalents which are identical to standard types are permitted –
although they are not mandatory in new code of your own.

When editing existing code which already uses one or the other set of
types, you should conform to the existing choices in that code.
"""

I wonder if we should do a one time replace in all our code and start
accepting only one to avoid confusion.

> 
> BR,
> Jani.
> 
> 

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux