lkml.org 
[lkml]   [2009]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [git pull] IDE fixes
On Wed, Apr 22, 2009 at 12:06:47PM -0700, Joe Perches wrote:
> 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;

Better to move assignment after variable definition.

Sam


\
 
 \ /
  Last update: 2009-04-22 21:23    [W:0.048 / U:0.684 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site