LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 2/5] ide: remove redundant BUG_ON() from [atapi_]reset_pollfunc()
@ 2008-02-02  0:46 Bartlomiej Zolnierkiewicz
  2008-02-06 18:08 ` Sergei Shtylyov
  0 siblings, 1 reply; 4+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-02-02  0:46 UTC (permalink / raw)
  To: linux-ide; +Cc: linux-kernel


Same BUG_ON() is present inside ide_set_handler().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/ide-iops.c |    2 --
 1 file changed, 2 deletions(-)

Index: b/drivers/ide/ide-iops.c
===================================================================
--- a/drivers/ide/ide-iops.c
+++ b/drivers/ide/ide-iops.c
@@ -860,7 +860,6 @@ static ide_startstop_t atapi_reset_pollf
 		printk("%s: ATAPI reset complete\n", drive->name);
 	} else {
 		if (time_before(jiffies, hwgroup->poll_timeout)) {
-			BUG_ON(HWGROUP(drive)->handler != NULL);
 			ide_set_handler(drive, &atapi_reset_pollfunc, HZ/20, NULL);
 			/* continue polling */
 			return ide_started;
@@ -900,7 +899,6 @@ static ide_startstop_t reset_pollfunc (i
 
 	if (!OK_STAT(tmp = hwif->INB(IDE_STATUS_REG), 0, BUSY_STAT)) {
 		if (time_before(jiffies, hwgroup->poll_timeout)) {
-			BUG_ON(HWGROUP(drive)->handler != NULL);
 			ide_set_handler(drive, &reset_pollfunc, HZ/20, NULL);
 			/* continue polling */
 			return ide_started;

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/5] ide: remove redundant BUG_ON() from [atapi_]reset_pollfunc()
  2008-02-02  0:46 [PATCH 2/5] ide: remove redundant BUG_ON() from [atapi_]reset_pollfunc() Bartlomiej Zolnierkiewicz
@ 2008-02-06 18:08 ` Sergei Shtylyov
  2008-02-06 20:43   ` Bartlomiej Zolnierkiewicz
  0 siblings, 1 reply; 4+ messages in thread
From: Sergei Shtylyov @ 2008-02-06 18:08 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: linux-ide, linux-kernel

Bartlomiej Zolnierkiewicz wrote:

> Same BUG_ON() is present inside ide_set_handler().

    There is no BUG_ON there -- __ide_set_handler() has a check for the same 
condition and a printk(KERN_CRIT)... myabe it should be replaced with BUG_ON()...

> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

MBR, Sergei

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/5] ide: remove redundant BUG_ON() from [atapi_]reset_pollfunc()
  2008-02-06 18:08 ` Sergei Shtylyov
@ 2008-02-06 20:43   ` Bartlomiej Zolnierkiewicz
  2008-02-07 12:55     ` Sergei Shtylyov
  0 siblings, 1 reply; 4+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-02-06 20:43 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: linux-ide, linux-kernel

On Wednesday 06 February 2008, Sergei Shtylyov wrote:
> Bartlomiej Zolnierkiewicz wrote:
> 
> > Same BUG_ON() is present inside ide_set_handler().
> 
>     There is no BUG_ON there -- __ide_set_handler() has a check for the same 
> condition and a printk(KERN_CRIT)... myabe it should be replaced with BUG_ON()...

Yeah, you're right - care to make a patch?

> > Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> 
> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
> 
> MBR, Sergei

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/5] ide: remove redundant BUG_ON() from [atapi_]reset_pollfunc()
  2008-02-06 20:43   ` Bartlomiej Zolnierkiewicz
@ 2008-02-07 12:55     ` Sergei Shtylyov
  0 siblings, 0 replies; 4+ messages in thread
From: Sergei Shtylyov @ 2008-02-07 12:55 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: linux-ide, linux-kernel

Bartlomiej Zolnierkiewicz wrote:

>>>Same BUG_ON() is present inside ide_set_handler().

>>    There is no BUG_ON there -- __ide_set_handler() has a check for the same 
>>condition and a printk(KERN_CRIT)... myabe it should be replaced with BUG_ON()...

> Yeah, you're right - care to make a patch?

    Replacing printk() with BUG_ON() and also removing BUG_ON() from 
ide_execute_command()? OK, will do...

>>>Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

>>Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

MBR, Sergei

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-02-07 12:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-02  0:46 [PATCH 2/5] ide: remove redundant BUG_ON() from [atapi_]reset_pollfunc() Bartlomiej Zolnierkiewicz
2008-02-06 18:08 ` Sergei Shtylyov
2008-02-06 20:43   ` Bartlomiej Zolnierkiewicz
2008-02-07 12:55     ` Sergei Shtylyov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).