On Thu, 24 May 2007 23:06:06 +0400
Cyrill Gorcunov <[EMAIL PROTECTED]> wrote:

> [Pekka Enberg - Thu, May 24, 2007 at 09:47:42PM +0300]
> | Hi Cyrill,
> | 
> | On 5/23/07, Cyrill Gorcunov <[EMAIL PROTECTED]> 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.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to