public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Masatake YAMATO <jet@gyve.org>
Cc: cebbert@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] never called printk statement in ide-taskfile.c::wait_drive_not_busy
Date: Sat, 16 Jun 2007 00:45:36 +0200	[thread overview]
Message-ID: <200706160045.36638.bzolnier@gmail.com> (raw)
In-Reply-To: <20070606.023558.230059723.jet@gyve.org>


Hi,

On Tuesday 05 June 2007, Masatake YAMATO wrote:
> > On 06/04/2007 10:21 PM, Masatake YAMATO wrote:
> > > diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
> > > index 30175c7..5e05311 100644
> > > --- a/drivers/ide/ide-taskfile.c
> > > +++ b/drivers/ide/ide-taskfile.c
> > > @@ -249,7 +249,7 @@ static u8 wait_drive_not_busy(ide_drive_t *drive)
> > >  	while (((stat = hwif->INB(IDE_STATUS_REG)) & BUSY_STAT) && retries--)
> > >  		udelay(10);
> > >  
> > > -	if (!retries)
> > > +	if (retries < 0)
> > 
> > 	if (stat & BUSY_STAT)
> > 
> > >  		printk(KERN_ERR "%s: drive still BUSY!\n", drive->name);
> > >  
> 
> Oh, yes.
> Giving `retries' both roles: loop counter and condition flag for logging
> may not good.
> 
> 
>     for (retries = 0; retries < 100; retries++)
>     {
> 	    if ((stat = hwif->INB(IDE_STATUS_REG)) & BUSY_STAT)
> 	       break;
> 
> 	    udelay(10);
>     }
> 
> 
>     if (stat & BUSY_STAT)
> 	    printk(KERN_ERR "%s: drive still BUSY!\n", drive->name);

Please re-submit this fix in the form of a patch so I can merge it.

Thanks,
Bart

  reply	other threads:[~2007-06-15 23:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-05  2:21 [PATCH] never called printk statement in ide-taskfile.c::wait_drive_not_busy Masatake YAMATO
2007-06-05 17:08 ` Chuck Ebbert
2007-06-05 17:35   ` Masatake YAMATO
2007-06-15 22:45     ` Bartlomiej Zolnierkiewicz [this message]
2007-06-17 18:05       ` Masatake YAMATO
2007-06-21 19:56         ` Bartlomiej Zolnierkiewicz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200706160045.36638.bzolnier@gmail.com \
    --to=bzolnier@gmail.com \
    --cc=cebbert@redhat.com \
    --cc=jet@gyve.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox