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: <1240427207.21848.81.camel@localhost>
Date:	Wed, 22 Apr 2009 12:06:47 -0700
From:	Joe Perches <joe@...ches.com>
To:	Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [git pull] IDE fixes

On Wed, 2009-04-22 at 20:48 +0200, Bartlomiej Zolnierkiewicz wrote:
> diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
> index 3aec19d..3d4e099 100644
> --- a/drivers/ide/ide-cd.c
> +++ b/drivers/ide/ide-cd.c
> @@ -609,7 +609,7 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
>  	struct request *rq = hwif->rq;
>  	ide_expiry_t *expiry = NULL;
>  	int dma_error = 0, dma, thislen, uptodate = 0;
> -	int write = (rq_data_dir(rq) == WRITE) ? 1 : 0, rc, nsectors;
> +	int write = (rq_data_dir(rq) == WRITE) ? 1 : 0, rc = 0, nsectors;
>  	int sense = blk_sense_request(rq);
>  	unsigned int timeout;
>  	u16 len;

I think ide is the only subsystem to use the
initialization style of "?:," with additional
declarations.

Would it be better to use a more standard style?

maybe:
	int dma_error = 0, dma, thislen, uptodate = 0, rc = 0, nsectors;
	int write = ((rq_data_dir(rq) == WRITE) ? 1 : 0;

> diff --git a/drivers/ide/palm_bk3710.c b/drivers/ide/palm_bk3710.c
> index c7acca0..d1513b4 100644
> --- a/drivers/ide/palm_bk3710.c
> +++ b/drivers/ide/palm_bk3710.c
[]
> @@ -75,13 +67,19 @@ struct palm_bk3710_udmatiming {
>  
>  static unsigned ideclk_period; /* in nanoseconds */
>  
> +struct palm_bk3710_udmatiming {
> +	unsigned int rptime;	/* tRP -- Ready to pause time (nsec) */
> +	unsigned int cycletime;	/* tCYCTYP2/2 -- avg Cycle Time (nsec) */
> +				/* tENV is always a minimum of 20 nsec */
> +};
> +
>  static const struct palm_bk3710_udmatiming palm_bk3710_udmatimings[6] = {
> -	{160, 240},		/* UDMA Mode 0 */
> -	{125, 160},		/* UDMA Mode 1 */
> -	{100, 120},		/* UDMA Mode 2 */
> -	{100, 90},		/* UDMA Mode 3 */
> -	{100, 60},		/* UDMA Mode 4 */
> -	{85,  40},		/* UDMA Mode 5 */
> +	{160, 240 / 2,},	/* UDMA Mode 0 */
> +	{125, 160 / 2,},	/* UDMA Mode 1 */
> +	{100, 120 / 2,},	/* UDMA Mode 2 */
> +	{100, 90 / 2,},		/* UDMA Mode 3 */
> +	{100, 60 / 2,},		/* UDMA Mode 4 */
> +	{85,  40 / 2,},		/* UDMA Mode 5 */
>  };
>  
>  static void palm_bk3710_setudmamode(void __iomem *base, unsigned int dev,

Odd looking commas.

Maybe:

	{.rptime = 160, .cycletime = 240 / 2 },	/* UDMA Mode 0 */
etc.

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