[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <200902162209.21827.bzolnier@gmail.com>
Date: Mon, 16 Feb 2009 22:09:21 +0100
From: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
To: petkovbb@...il.com
Cc: linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 11/20] ide-cd: unify cdrom_newpc_intr() exit paths
On Monday 16 February 2009, Borislav Petkov wrote:
> On Mon, Feb 16, 2009 at 01:14:22AM +0100, Bartlomiej Zolnierkiewicz wrote:
> > From: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
> > Subject: [PATCH] ide-cd: unify cdrom_newpc_intr() exit paths
> >
> > * Move cdrom_end_request() calls from cdrom_decode_status()
> > and ide_cd_check_ireason() to cdrom_newpc_intr().
> >
> > * Unify cdrom_newpc_intr() exit paths.
> >
> > There should be no functional changes caused by this patch.
> >
> > Cc: Borislav Petkov <petkovbb@...il.com>
> > Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
> > ---
> > drivers/ide/ide-cd.c | 48 +++++++++++++++++++++++-------------------------
> > 1 file changed, 23 insertions(+), 25 deletions(-)
> >
> > Index: b/drivers/ide/ide-cd.c
> > ===================================================================
> > --- a/drivers/ide/ide-cd.c
> > +++ b/drivers/ide/ide-cd.c
> > @@ -291,7 +291,8 @@ static void cdrom_end_request(ide_drive_
> > /*
> > * Returns:
> > * 0: if the request should be continued.
> > - * 1: if the request was ended.
> > + * 1: if the request will be going through error recovery.
> > + * 2: if the request should be ended.
>
> Yeah, we need defines for those. Especially if they're checked in other
> functions:
>
> if (rc == 2)
>
> is simply not ok :). Rather,
>
> if (rc == DO_END_REQUEST)
>
> or something like that is much better, imho.
The whole cdrom_decode_status() needs a rewrite. It could be as well
that after that happens magic defines won't be needed anylonger...
Thanks,
Bart
--
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