lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070319083159.0744cf5e.randy.dunlap@oracle.com>
Date:	Mon, 19 Mar 2007 08:31:59 -0700
From:	Randy Dunlap <randy.dunlap@...cle.com>
To:	Jesper Juhl <jesper.juhl@...il.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>, Andi Kleen <ak@...e.de>,
	Trent Waddington <trent.waddington@...il.com>,
	Bartlomiej Zolnierkiewicz <bzolnier@...il.com>,
	Alan Cox <alan@...rguk.ukuu.org.uk>
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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ