public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>, Jan Kara <jack@suse.cz>,
	Christoph Hellwig <hch@infradead.org>,
	Ben Fennema <bfennema@falcon.csc.calpoly.edu>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH]: UDF code style conversion to kernel style
Date: Thu, 24 May 2007 12:28:10 -0700	[thread overview]
Message-ID: <20070524122810.3c02b257.akpm@linux-foundation.org> (raw)
In-Reply-To: <20070524190606.GB20500@cvg>

On Thu, 24 May 2007 23:06:06 +0400
Cyrill Gorcunov <gorcunov@gmail.com> wrote:

> [Pekka Enberg - Thu, May 24, 2007 at 09:47:42PM +0300]
> | Hi Cyrill,
> | 
> | On 5/23/07, Cyrill Gorcunov <gorcunov@gmail.com> wrote:
> | >@@ -2103,7 +1944,7 @@ long udf_block_map(struct inode *inode, sector_t 
> | >block)
> | > 	kernel_lb_addr eloc;
> | > 	uint32_t elen;
> | > 	sector_t offset;
> | >-	struct extent_position epos = { NULL, 0, { 0, 0}};
> | >+	struct extent_position epos = {};
> | 
> | Bits like these in the middle of indentation fixes makes me feel
> | uneasy. Could we simply ask Andrew to run Lindent on the UDF sources
> | at some convinient point and push those to Linus like we did with
> | mm/slab.c if I recall correctly? Its safer to do cleanups like these
> | after that.
> | 
> 
> Dunno... Pekka, the patch I sent also added empty lines to separate
> some code block to be convenient to read. For some parts of code
> additinal 'if...else..' braces were added. Anyway even the code being
> formatted by linednt is to be reviewed manually I think. Anyway, your
> word Andrew?
> 

Such a patch should be whitespace-only: ideally it should generate an
identical .o file.  There may be legitimate reasons why the .o file
isn't identical, but we'd need to understand why that happened.  

The way to do this is as two patches (or two-per-C file):

1: feed foo.c through Lindent

2: manual fixups for places where Lindent went wrong.


<fiddles a bit>

OK, so I did

make kernel/sched.s
Lindent kernel/sched.c
make kernel/sched.s

and compared the two sched.s's:

--- kernel/sched.s      2007-05-24 12:25:40.000000000 -0700
+++ /tmp/sched.s        2007-05-24 12:25:16.000000000 -0700
@@ -1713,7 +1713,7 @@
        1:      ud2
 .pushsection __bug_table,"a"
 2:     .long 1b, .LC8  #
-       .word 4306, 0   #
+       .word 4308, 0   #
        .org 2b+12      #
 .popsection
 #NO_APP
@@ -1730,7 +1730,7 @@
        1:      ud2
 .pushsection __bug_table,"a"
 2:     .long 1b, .LC8  #
-       .word 4274, 0   #
+       .word 4276, 0   #
        .org 2b+12      #
 .popsection
 #NO_APP
@@ -2441,7 +2441,7 @@
 .L522:
        movl    $__func__.24446, %eax   #,
        movl    %eax, 12(%esp)  #,
-       movl    $1921, %eax     #,
+       movl    $1920, %eax     #,
        movl    %eax, 8(%esp)   #,
        movl    $.LC8, %eax     #,
        movl    %eax, 4(%esp)   #,
@@ -3855,7 +3855,7 @@
        1:      ud2
 .pushsection __bug_table,"a"
 2:     .long 1b, .LC8  #
-       .word 4078, 0   #
+       .word 4082, 0   #
        .org 2b+12      #
 .popsection
 #NO_APP


those differences are all due to changed line numbers, so we know that this
was a safe change.



  reply	other threads:[~2007-05-24 19:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-23 18:44 [PATCH]: UDF code style conversion to kernel style Cyrill Gorcunov
     [not found] ` <20070524083714.GA27047@duck.suse.cz>
2007-05-24 14:34   ` Cyrill Gorcunov
2007-05-24 18:47 ` Pekka Enberg
2007-05-24 18:57   ` Randy Dunlap
2007-05-24 19:09     ` Pekka Enberg
2007-05-24 19:06   ` Cyrill Gorcunov
2007-05-24 19:28     ` Andrew Morton [this message]
2007-05-24 19:08   ` Cyrill Gorcunov
2007-05-24 19:11     ` Pekka Enberg

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=20070524122810.3c02b257.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=bfennema@falcon.csc.calpoly.edu \
    --cc=gorcunov@gmail.com \
    --cc=hch@infradead.org \
    --cc=jack@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penberg@cs.helsinki.fi \
    /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