Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1409149

Re: [PATCH v2 1/4] staging : comedi : fix type issues in s626.c

From Luis de Bethencourt <luisbg@osg.samsung.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 1/4] staging : comedi : fix type issues in s626.c
Date 2016-05-30 16:10 +0200
Message-ID <rEw3g-5dn-21@gated-at.bofh.it> (permalink)
References <rDEYV-4Tt-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 28/05/16 06:26, Ravishankar Karkala Mallikarjunayya wrote:
> This is a patch to the s626.c file that fixes up a type issues like
> i.e Prefer kernel type 'u8' over 'uint8_t'
>     Prefer kernel type 'u16' over 'uint16_t'
>     Prefer kernel type 'u32' over 'uint32_t'
>     Prefer kernel type 's16' over 'int16_t'
>     Prefer kernel type 's32' over 'int32_t'
> found by the checkpatch.pl tool.
> 
> Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankarkm32@gmail.com>

From the CodingStyle [0]:

"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."

Not sure why checkpatch complains about this when the CodingStyle suggests
to conform to the choice in the existing code.

Anybody can shed some light on this?

Thanks,
Luis



[0] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/CodingStyle#n318

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH v2 1/4] staging : comedi : fix type issues in s626.c Ravishankar Karkala Mallikarjunayya <ravishankarkm32@gmail.com> - 2016-05-28 07:30 +0200
  Re: [PATCH v2 1/4] staging : comedi : fix type issues in s626.c Luis de Bethencourt <luisbg@osg.samsung.com> - 2016-05-30 16:10 +0200

csiph-web