Re: [PATCH] drivers/block/floppy.c: stylistic cleanups

From: Stephen Hemminger
Date: Tue Dec 01 2009 - 11:46:27 EST


On Mon, 30 Nov 2009 20:13:40 -0800
Joe Perches <joe@xxxxxxxxxxx> wrote:

> On Mon, 2009-11-30 at 09:28 -0800, Stephen Hemminger wrote:
> > Rather than playing with the dangling operator format which seems to be a coding
> > style that only David cares about. Why not go through and fix the really ugly old
> > drivers that need it. For a good horror experience, go look at the floppy driver.
>
> Just for you Stephen, here's a cleaned up version.
> Now to see if it gets applied, which I rather doubt.
>
> Changes:
>
> Removed macro definitions and uses of
> IN, OUT, LAST_OUT, CLEARSTRUCT, and CHECK_RESET
> Used C99 initializers
> Removed assigns from if statements
> Converted printks without KERN_ levels to pr_info and pr_cont
> Removed unnecessary braces
> Used print_hex_dump
> Moved leading logical tests to end of previous line
> Surrounded still ugly CALL and ECALL macro with do {} while (0)
>
> Checkpatch complaints before:
> total: 393 errors, 132 warnings, 4647 lines checked
>
> after:
> total: 1 errors, 11 warnings, 5352 lines checked
>
> Compile tested only, x86 allyesconfig
>
> Signed-off-by: Joe Perches <joe@xxxxxxxxxxx>

I have a fix (to get rid of Buffer I/O error when testing for drive present),
so I'll put your cleanup in first.


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