* [PATCH/URL] reiserfs: reformat code with Lindent
@ 2005-07-12 19:42 Jeff Mahoney
2005-07-12 21:46 ` Alexey Dobriyan
2005-07-12 22:49 ` Linus Torvalds
0 siblings, 2 replies; 4+ messages in thread
From: Jeff Mahoney @ 2005-07-12 19:42 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds, Linux Kernel Mailing List,
ReiserFS List
The ReiserFS code is a mix of a number of different coding styles, sometimes
different even from line-to-line. Since the code has been relatively stable
for quite some time and there are few outstanding patches to be applied, it
is time to reformat the code to conform to the Linux style standard outlined
in Documentation/CodingStyle.
This patch contains the result of running scripts/Lindent against
fs/reiserfs/*.c and include/linux/reiserfs_*.h. There are places where the
code can be made to look better, but I'd rather keep those patches separate
so that there isn't a subtle by-hand hand accident in the middle of a huge
patch. To be clear: This patch is reformatting *only*.
A number of patches may follow that continue to make the code more consistent
with the Linux coding style.
Hans wasn't particularly enthusiastic about these patches, but said he
wouldn't really oppose them either.
Due to the size of this patch (1.5M), I've posted it at:
ftp://ftp.suse.com/pub/people/jeffm/reiserfs/kernel-v2.6/cleanups/2.6.13-rc2/01-reiserfs-lindent.diff
-Jeff
--
Jeff Mahoney
SuSE Labs
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH/URL] reiserfs: reformat code with Lindent
2005-07-12 19:42 [PATCH/URL] reiserfs: reformat code with Lindent Jeff Mahoney
@ 2005-07-12 21:46 ` Alexey Dobriyan
2005-07-12 22:49 ` Linus Torvalds
1 sibling, 0 replies; 4+ messages in thread
From: Alexey Dobriyan @ 2005-07-12 21:46 UTC (permalink / raw)
To: Jeff Mahoney; +Cc: Andrew Morton, Linus Torvalds, linux-kernel, reiserfs-list
On Tuesday 12 July 2005 23:42, Jeff Mahoney wrote:
> The ReiserFS code is a mix of a number of different coding styles, sometimes
> different even from line-to-line. Since the code has been relatively stable
> for quite some time and there are few outstanding patches to be applied, it
> is time to reformat the code to conform to the Linux style standard outlined
> in Documentation/CodingStyle.
> This patch contains the result of running scripts/Lindent
With -psl picked up.
-int is_reusable (struct super_block * s, b_blocknr_t block, int bit_value)
+int
+is_reusable(struct super_block *s, b_blocknr_t block, int bit_value)
> against
> fs/reiserfs/*.c
patching file fs/reiserfs/item_ops.c
Hunk #1 FAILED at 793.
1 out of 1 hunk FAILED -- saving rejects to file fs/reiserfs/item_ops.c.rej
> and include/linux/reiserfs_*.h.
Only fs/reiserfs/*.c part.
$ diffstat -p1 01-reiserfs-lindent.diff
fs/reiserfs/bitmap.c | 1932 ++++++-----
fs/reiserfs/dir.c | 485 +-
fs/reiserfs/do_balan.c | 3229 +++++++++++--------
fs/reiserfs/file.c | 2615 ++++++++-------
fs/reiserfs/fix_node.c | 4136 ++++++++++++------------
fs/reiserfs/hashes.c | 198 -
fs/reiserfs/ibalance.c | 1851 +++++------
fs/reiserfs/inode.c | 5005 +++++++++++++++---------------
fs/reiserfs/ioctl.c | 203 -
fs/reiserfs/item_ops.c | 18
fs/reiserfs/journal.c | 6994 ++++++++++++++++++++++--------------------
fs/reiserfs/lbalance.c | 2232 ++++++-------
fs/reiserfs/namei.c | 2637 ++++++++-------
fs/reiserfs/objectid.c | 308 -
fs/reiserfs/prints.c | 1065 +++---
fs/reiserfs/procfs.c | 751 ++--
fs/reiserfs/resize.c | 208 -
fs/reiserfs/stree.c | 3488 ++++++++++----------
fs/reiserfs/super.c | 3751 +++++++++++-----------
fs/reiserfs/tail_conversion.c | 467 +-
fs/reiserfs/xattr.c | 2148 ++++++------
fs/reiserfs/xattr_acl.c | 632 +--
fs/reiserfs/xattr_security.c | 53
fs/reiserfs/xattr_trusted.c | 69
fs/reiserfs/xattr_user.c | 88
25 files changed, 23412 insertions(+), 21151 deletions(-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH/URL] reiserfs: reformat code with Lindent
2005-07-12 19:42 [PATCH/URL] reiserfs: reformat code with Lindent Jeff Mahoney
2005-07-12 21:46 ` Alexey Dobriyan
@ 2005-07-12 22:49 ` Linus Torvalds
2005-07-12 23:16 ` Jeff Mahoney
1 sibling, 1 reply; 4+ messages in thread
From: Linus Torvalds @ 2005-07-12 22:49 UTC (permalink / raw)
To: Jeff Mahoney; +Cc: Andrew Morton, Linux Kernel Mailing List, ReiserFS List
On Tue, 12 Jul 2005, Jeff Mahoney wrote:
>
> This patch contains the result of running scripts/Lindent against
> fs/reiserfs/*.c and include/linux/reiserfs_*.h.
That can't be true. It isn't actually following the Lindent rules. It has
that braindamaged "put the type on a separate line" thing for function
declarations, making a "grep" not show the type. That's very much against
the Linux coding style.
So either your "indent" is broken, or you've used something else than
Lindent.
Also, if it's a pure indentation change with no other changes, I'd almost
prefer it as a script, not a patch. That way it's obvious to everybody
that it's just doing indentation.
Linus
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH/URL] reiserfs: reformat code with Lindent
2005-07-12 22:49 ` Linus Torvalds
@ 2005-07-12 23:16 ` Jeff Mahoney
0 siblings, 0 replies; 4+ messages in thread
From: Jeff Mahoney @ 2005-07-12 23:16 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Andrew Morton, Linux Kernel Mailing List, ReiserFS List
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Linus Torvalds wrote:
>
> On Tue, 12 Jul 2005, Jeff Mahoney wrote:
>> This patch contains the result of running scripts/Lindent against
>> fs/reiserfs/*.c and include/linux/reiserfs_*.h.
>
> That can't be true. It isn't actually following the Lindent rules. It has
> that braindamaged "put the type on a separate line" thing for function
> declarations, making a "grep" not show the type. That's very much against
> the Linux coding style.
>
> So either your "indent" is broken, or you've used something else than
> Lindent.
>
> Also, if it's a pure indentation change with no other changes, I'd almost
> prefer it as a script, not a patch. That way it's obvious to everybody
> that it's just doing indentation.
Sigh. I guess some options in my .indent.pro overrode those in
scripts/Lindent. I just assumed it would do its job.
At any rate, the goal really is only to change the indentation to the
Linux standard, so I'll post a pre-patch to fix up a case where indent
misreads the code and indents a tab stop, as well as the one liner to
reformat.
- -Jeff
- --
Jeff Mahoney
SuSE Labs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFC1E88LPWxlyuTD7IRAt6iAJ4lLRdo8Pm9FLMRSKR2EnNX9JO6ogCgiTFG
kCkCafDtbstfWigkN8m/9U8=
=p+20
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-07-12 23:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-12 19:42 [PATCH/URL] reiserfs: reformat code with Lindent Jeff Mahoney
2005-07-12 21:46 ` Alexey Dobriyan
2005-07-12 22:49 ` Linus Torvalds
2005-07-12 23:16 ` Jeff Mahoney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox