All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Waychison <mikew@google.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Greg KH <greg@kroah.com>,
	torvalds@linux-foundation.org, San Mehat <san@google.com>,
	Aaron Durbin <adurbin@google.com>,
	Duncan Laurie <dlaurie@google.com>,
	linux-kernel@vger.kernel.org, Tim Hockin <thockin@google.com>
Subject: Re: [PATCH v1 3/6] driver: Google EFI SMI
Date: Thu, 27 Jan 2011 11:22:55 -0800	[thread overview]
Message-ID: <AANLkTikGJJsnAwiyhrS6m8TJQfR8UHCzZG+t=2GHFRiW@mail.gmail.com> (raw)
In-Reply-To: <20110127104343.5931161e@lxorguk.ukuu.org.uk>

[-- Attachment #1: Type: text/plain, Size: 1237 bytes --]

On Thu, Jan 27, 2011 at 2:43 AM, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
>> I understand that type widths change in a compat setting.  So what?
>> Code in each environment is written to it's own namespace anyhow.
>
> So you ned up with a pile of extra crap in the kernel to handle 32bit
> userspace on 64bit and the like. If instead the structs are carefully
> laid out this doesn't occur.
>
>> Here's what *I* think *you* think about __u32 vs u32 vs uint32_t.
>> Correct me if I'm totally off-base here:
>
> And the __aligned_ ones for things like u64 in ioctls and structs...
>
> It's also a style and consistency thing, its trivialto use the same style
> as the rest of the kernel, it's trivial to tweak and it helps keep
> coherency of style, even if you are sitting at the keyboard mumbling
> "bunch of morons if you ask me" while doing it ;)

I'm always mumbling and cursing at my desk :p

I've already changed the series to not use C99 types.  I understand
the value in style consistency :)

I'm still trying to understand if there is any actual technical merit
to avoid standard types though, of which there doesn't seem to be any.

Anyhow, I've attached a patch that fixes the style documentation.

[-- Attachment #2: patch --]
[-- Type: application/octet-stream, Size: 788 bytes --]

CodingStyle: Fix documentation on use of C99 types.

Reality has it that new code is discouraged from using C99 exact width
types.  Fix the documentation.

Signed-off-by: Mike Waychison <mikew@google.com>
diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle
index 8bb3723..8dd2e77 100644
--- a/Documentation/CodingStyle
+++ b/Documentation/CodingStyle
@@ -323,8 +323,7 @@ useful only for:
 
      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.
+     preferred.
 
      When editing existing code which already uses one or the other set
      of types, you should conform to the existing choices in that code.

  reply	other threads:[~2011-01-27 19:23 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-25  0:24 [PATCH v1 0/6] google firmware support Mike Waychison
2011-01-25  0:24 ` [PATCH v1 1/6] Add oops notification chain Mike Waychison
2011-01-25  2:06   ` Greg KH
2011-01-25 20:01     ` Mike Waychison
2011-01-25 21:36       ` Jeff Garzik
2011-01-25 21:43         ` Aaron Durbin
2011-01-25 21:54           ` Jeff Garzik
2011-01-25 22:21             ` Aaron Durbin
2011-01-26  2:48               ` Greg KH
2011-01-26 21:50                 ` Mike Waychison
2011-01-25  0:24 ` [PATCH v1 2/6] Introduce CONFIG_GOOGLE_FIRMWARE Mike Waychison
2011-01-25  0:24 ` [PATCH v1 3/6] driver: Google EFI SMI Mike Waychison
2011-01-25  3:17   ` Greg KH
2011-01-25 23:12     ` Mike Waychison
2011-01-26  2:46       ` Greg KH
2011-01-26 23:58         ` Mike Waychison
2011-01-27  1:22           ` Mike Waychison
2011-01-27 23:41             ` Mike Waychison
2011-01-28  2:56               ` Greg KH
2011-02-20  4:44               ` Matt Domsch
2011-02-21 13:58                 ` Matthew Garrett
2011-01-27 10:43           ` Alan Cox
2011-01-27 19:22             ` Mike Waychison [this message]
2011-01-28  2:55               ` Greg KH
2011-01-28  2:59           ` Greg KH
2011-01-25  0:24 ` [PATCH v1 4/6] driver: Google Bootlog Mike Waychison
2011-01-25  0:49   ` Alan Cox
2011-01-25  1:38     ` Mike Waychison
2011-01-25  9:43       ` Alan Cox
2011-01-25  0:25 ` [PATCH v1 5/6] Allow prepending to the dmesg Mike Waychison
2011-01-25  1:01   ` Andrew Morton
2011-01-25  0:25 ` [PATCH v1 6/6] driver: Google Memory Console Mike Waychison
2011-01-25  2:00   ` Greg KH
2011-01-25  3:01 ` [PATCH v1 0/6] google firmware support Greg KH
2011-01-25 19:58   ` Mike Waychison
2011-01-26  2:47     ` Greg KH

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='AANLkTikGJJsnAwiyhrS6m8TJQfR8UHCzZG+t=2GHFRiW@mail.gmail.com' \
    --to=mikew@google.com \
    --cc=adurbin@google.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=dlaurie@google.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=san@google.com \
    --cc=thockin@google.com \
    --cc=torvalds@linux-foundation.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.