Messages in this thread | | | Date | Mon, 19 Mar 2007 08:31:59 -0700 | From | Randy Dunlap <> | Subject | Re: [PATCH][1/5][resend] floppy.c: Initial (partial) CodingStyle cleanup |
| |
On Mon, 19 Mar 2007 16:10:13 +0100 Jesper Juhl wrote:
> This is a basic CodingStyle cleanup for drivers/block/floppy.c > > There are no functional changes in this patch. > --- > > diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c > index 5231ed7..5da54b8 100644 > --- a/drivers/block/floppy.c > +++ b/drivers/block/floppy.c
> @@ -1188,7 +1193,7 @@ static int output_byte(char byte) > return -1; > } > > -#define LAST_OUT(x) if (output_byte(x)<0){ reset_fdc();return;} > +#define LAST_OUT(x) if (output_byte(x) < 0) { reset_fdc(); return; }
Not for a coding style cleanup, but that macro is Bad according to CodingStyle, so hopefully it will be cleaned up in the future.
Things to avoid when using macros: 1) macros that affect control flow:
> /* gets the response from the fdc */ > static int result(void)
> @@ -3816,7 +3803,7 @@ static int check_floppy_change(struct gendisk *disk) > */ > > static int floppy_rb0_complete(struct bio *bio, unsigned int bytes_done, > - int err) > + int err)
I don't care one way or the other about most of these, but would you explain that one above (and others like it), please? It's not an < 80 columns thing. My <cough> recollection is that many indented function parameters in Linux are indented more like the original here, near the opening '(' after the function name, although I suppose that none of this is in CodingStyle.
> { > if (bio->bi_size) > return 1;
--- ~Randy *** Remember to use Documentation/SubmitChecklist when testing your code *** - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |