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: <20130320124753.GZ9138@mwanda>
Date:	Wed, 20 Mar 2013 15:47:53 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	Alice Ferrazzi <alice.ferrazzi@...il.com>
Cc:	gregkh@...uxfoundation.org, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Staging: comedi: serial2002: fixed consistent spacing
 issue

On Wed, Mar 20, 2013 at 09:26:51PM +0900, Alice Ferrazzi wrote:
> Fixed consistent spacing around '*'.
> 

The original was correct, actually.

> Signed-off-by: Alice Ferrazzi <alice.ferrazzi@...il.com>
> ---
>  drivers/staging/comedi/drivers/serial2002.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/comedi/drivers/serial2002.c b/drivers/staging/comedi/drivers/serial2002.c
> index e6177b4..858d364 100644
> --- a/drivers/staging/comedi/drivers/serial2002.c
> +++ b/drivers/staging/comedi/drivers/serial2002.c
> @@ -604,7 +604,7 @@ static int serial_2002_open(struct comedi_device *dev)
>  							    c[j].max;
>  							range_table_list[chan] =
>  							    (const struct
> -							     comedi_lrange *)
> +							     comedi_lrange*)
>  							    &range[j];

The original code here needs to broken up into functions so it isn't
squashed up against the 80 character limit.

For casts the spacing should look like:

	foo = (struct my_struct *)ptr;

There is a space after "my_struct" but no space after the closing
parenthesis.  Use that to remind yourself that casting is a high
precedence operation.

For declaring pointers the spacing is:

	struct my_struct *ptr;

For multiplication the spacing is:

	foo = x * y;

Or multplication with a dereference it would be:

	foo = x * *ptr;


regards,
dan carpenter

--
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