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] [day] [month] [year] [list]
Date:	Sun, 18 Aug 2013 19:50:44 -0700
From:	Joe Perches <joe@...ches.com>
To:	Thiagarajan Thangavel <write2thiagu@...il.com>
Cc:	grant.likely@...aro.org, linux-kernel@...r.kernel.org,
	devicetree@...r.kernel.org
Subject: Re: [PATCH 2/2] drivers: block :swim3: fixed the errors on coding
 style

On Mon, 2013-08-19 at 01:09 +0530, Thiagarajan Thangavel wrote:
> Fixed the coding style errors
[]
> diff --git a/drivers/block/swim3.c b/drivers/block/swim3.c
[]
> @@ -783,7 +783,7 @@ static irqreturn_t swim3_interrupt(int irq, void *dev_id)
>  				act(fs);
>  			} else {
>  				swim3_err("Error %sing block %ld (err=%x)\n",
> -				       rq_data_dir(req) == WRITE ? "writ" : "read",
> +				rq_data_dir(req) == WRITE ? "writ" : "read",

This looks worse to me.

My preference would be to align the arguments to the open
parenthesis and to use full words instead:

				swim3_err("Error %s block %ld (err=%x)\n",
					  rq_data_dir(req) == WRITE ? "writing" : "reading",
					  (long)blk_rq_pos(req), err);

> @@ -894,7 +894,18 @@ static int fd_eject(struct floppy_state *fs)
[]
> -static struct floppy_struct floppy_type = { 2880, 18, 2, 80, 0, 0x1B, 0x00, 0xCF, 0x6C, NULL };	/*  7 1.44MB 3.5"   */
> +static struct floppy_struct floppy_type = {
> +	2880,
> +	18,
> +	2,
> +	80,
> +	0,
> +	0x1B,
> +	0x00,
> +	0xCF,
> +	0x6C,
> +	NULL
> +};	/*  7 1.44MB 3.5"   */

These changes are unattractive to me.
I don't find much wrong with the original though
I would probably have written it as:

static struct floppy_struct floppy_type = {	/* 7 1.44MB 3.5" */
	2880, 18, 2, 80, 0, 0x1B, 0x00, 0xCF, 0x6C, NULL
};


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