public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
To: Harvey Harrison
	<harvey.harrison-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Andrew Morton
	<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
	Linus Torvalds
	<torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
	David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	linux-arch <linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCHv3 2/2] kernel: Move arches to use common unaligned access
Date: Mon, 14 Apr 2008 17:34:48 +0100	[thread overview]
Message-ID: <20080414163448.GA8473@flint.arm.linux.org.uk> (raw)
In-Reply-To: <1208190432.5721.1.camel@brick>

On Mon, Apr 14, 2008 at 09:27:12AM -0700, Harvey Harrison wrote:
> On Mon, 2008-04-14 at 12:11 +0100, Russell King wrote:
> > On Mon, Apr 14, 2008 at 11:32:09AM +0100, David Howells wrote:
> > > Harvey Harrison <harvey.harrison-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > > 
> > > > -#ifndef _ASM_UNALIGNED_H
> > > > -#define _ASM_UNALIGNED_H
> > > > +#ifndef _ASM_FRV_UNALIGNED_H_
> > > > +#define _ASM_FRV_UNALIGNED_H_
> > > 
> > > Please don't.  Why do you need to change these to make your patch work?
> > 
> > Indeed - ditto for the ARM changes.  The patch is changing them to a
> > different style to the others in the respective asm/ directories -
> > which is also different from the linux/ directory.
> > 
> > IMHO, if Harvey wishes to clean those up, then that should be a separate
> > patch and should be part of a set converting all includes to use the
> > same style.
> > 
> 
> OK, I'll revise without these changes.  I am curious what the preferred
> 'linux' style is (if there is one).

The one that's already established by the majority is one answer. 8)

$ grep '^#ifndef LINUX_.*_H$' include/linux/*.h | wc -l
33
$ grep '^#ifndef _LINUX_.*_H$' include/linux/*.h | wc -l
388
$ grep '^#ifndef __LINUX_.*_H$' include/linux/*.h | wc -l
110
$ grep '^#ifndef LINUX_.*_H_$' include/linux/*.h | wc -l
1
$ grep '^#ifndef LINUX_.*_H__$' include/linux/*.h | wc -l
0
$ grep '^#ifndef _LINUX_.*_H_$' include/linux/*.h | wc -l
20
$ grep '^#ifndef __LINUX_.*_H__$' include/linux/*.h | wc -l
20

So it seems _LINUX_FOO_H for linux/foo.h wins.

But... honestly, I wouldn't bother with such a cleanup - at the end of
the day, it's personal choice and people are always going to do something
slightly different.  So it's probably best all round to just accept what's
already in the files you're modifying.

Let's not add to the expanding beaurocracy by demanding a format for these
macro names.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:

WARNING: multiple messages have this Message-ID (diff)
From: Russell King <rmk@arm.linux.org.uk>
To: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	David Howells <dhowells@redhat.com>,
	linux-arch <linux-arch@vger.kernel.org>
Subject: Re: [PATCHv3 2/2] kernel: Move arches to use common unaligned access
Date: Mon, 14 Apr 2008 17:34:48 +0100	[thread overview]
Message-ID: <20080414163448.GA8473@flint.arm.linux.org.uk> (raw)
Message-ID: <20080414163448.Cgr3jKURV2m-08sGdN6_KXb0607MH7sfQRlD0oMc32o@z> (raw)
In-Reply-To: <1208190432.5721.1.camel@brick>

On Mon, Apr 14, 2008 at 09:27:12AM -0700, Harvey Harrison wrote:
> On Mon, 2008-04-14 at 12:11 +0100, Russell King wrote:
> > On Mon, Apr 14, 2008 at 11:32:09AM +0100, David Howells wrote:
> > > Harvey Harrison <harvey.harrison@gmail.com> wrote:
> > > 
> > > > -#ifndef _ASM_UNALIGNED_H
> > > > -#define _ASM_UNALIGNED_H
> > > > +#ifndef _ASM_FRV_UNALIGNED_H_
> > > > +#define _ASM_FRV_UNALIGNED_H_
> > > 
> > > Please don't.  Why do you need to change these to make your patch work?
> > 
> > Indeed - ditto for the ARM changes.  The patch is changing them to a
> > different style to the others in the respective asm/ directories -
> > which is also different from the linux/ directory.
> > 
> > IMHO, if Harvey wishes to clean those up, then that should be a separate
> > patch and should be part of a set converting all includes to use the
> > same style.
> > 
> 
> OK, I'll revise without these changes.  I am curious what the preferred
> 'linux' style is (if there is one).

The one that's already established by the majority is one answer. 8)

$ grep '^#ifndef LINUX_.*_H$' include/linux/*.h | wc -l
33
$ grep '^#ifndef _LINUX_.*_H$' include/linux/*.h | wc -l
388
$ grep '^#ifndef __LINUX_.*_H$' include/linux/*.h | wc -l
110
$ grep '^#ifndef LINUX_.*_H_$' include/linux/*.h | wc -l
1
$ grep '^#ifndef LINUX_.*_H__$' include/linux/*.h | wc -l
0
$ grep '^#ifndef _LINUX_.*_H_$' include/linux/*.h | wc -l
20
$ grep '^#ifndef __LINUX_.*_H__$' include/linux/*.h | wc -l
20

So it seems _LINUX_FOO_H for linux/foo.h wins.

But... honestly, I wouldn't bother with such a cleanup - at the end of
the day, it's personal choice and people are always going to do something
slightly different.  So it's probably best all round to just accept what's
already in the files you're modifying.

Let's not add to the expanding beaurocracy by demanding a format for these
macro names.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:

  parent reply	other threads:[~2008-04-14 16:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-11 21:47 [PATCHv3 2/2] kernel: Move arches to use common unaligned access Harvey Harrison
2008-04-11 21:47 ` Harvey Harrison
2008-04-14 10:32 ` David Howells
2008-04-14 10:32   ` David Howells
     [not found]   ` <4392.1208169129-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2008-04-14 11:11     ` Russell King
2008-04-14 11:11       ` Russell King
     [not found]       ` <20080414111119.GA6228-f404yB8NqCZvn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2008-04-14 16:27         ` Harvey Harrison
2008-04-14 16:27           ` Harvey Harrison
2008-04-14 16:34           ` Russell King [this message]
2008-04-14 16:34             ` Russell King
     [not found]             ` <20080414163448.GA8473-f404yB8NqCZvn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2008-04-14 16:52               ` Harvey Harrison
2008-04-14 16:52                 ` Harvey Harrison

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=20080414163448.GA8473@flint.arm.linux.org.uk \
    --to=rmk-lfz/pmaqli7xmaaqvzeohq@public.gmane.org \
    --cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=harvey.harrison-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox