aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Vlasenko <vda@ilport.com.ua>2005-07-03 11:09:13 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@elka.pw.edu.pl>2005-07-03 11:09:13 -0400
commit13bbbf28fb914da6707aad44a073651f5c9d13a5 (patch)
tree16cea5674a7da7aa1b318685598a87d7dc806ba1
parentf3718d3e135117f80de0ff219be91544baa75599 (diff)
[PATCH] ide: fix line break in ide messages
From: Denis Vlasenko <vda@ilport.com.ua> * printk("\n") is misplaced, resulting in stray empty line in kernel log * cleanups nerby: some back-to-back printks are combined, etc Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@elka.pw.edu.pl>
-rw-r--r--drivers/ide/ide-lib.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/ide/ide-lib.c b/drivers/ide/ide-lib.c
index 6806d407e9c1..b09a6537c7a8 100644
--- a/drivers/ide/ide-lib.c
+++ b/drivers/ide/ide-lib.c
@@ -487,8 +487,7 @@ static u8 ide_dump_ata_status(ide_drive_t *drive, const char *msg, u8 stat)
487 u8 err = 0; 487 u8 err = 0;
488 488
489 local_irq_set(flags); 489 local_irq_set(flags);
490 printk("%s: %s: status=0x%02x", drive->name, msg, stat); 490 printk("%s: %s: status=0x%02x { ", drive->name, msg, stat);
491 printk(" { ");
492 if (stat & BUSY_STAT) 491 if (stat & BUSY_STAT)
493 printk("Busy "); 492 printk("Busy ");
494 else { 493 else {
@@ -500,15 +499,13 @@ static u8 ide_dump_ata_status(ide_drive_t *drive, const char *msg, u8 stat)
500 if (stat & INDEX_STAT) printk("Index "); 499 if (stat & INDEX_STAT) printk("Index ");
501 if (stat & ERR_STAT) printk("Error "); 500 if (stat & ERR_STAT) printk("Error ");
502 } 501 }
503 printk("}"); 502 printk("}\n");
504 printk("\n");
505 if ((stat & (BUSY_STAT|ERR_STAT)) == ERR_STAT) { 503 if ((stat & (BUSY_STAT|ERR_STAT)) == ERR_STAT) {
506 err = hwif->INB(IDE_ERROR_REG); 504 err = hwif->INB(IDE_ERROR_REG);
507 printk("%s: %s: error=0x%02x", drive->name, msg, err); 505 printk("%s: %s: error=0x%02x { ", drive->name, msg, err);
508 printk(" { ");
509 if (err & ABRT_ERR) printk("DriveStatusError "); 506 if (err & ABRT_ERR) printk("DriveStatusError ");
510 if (err & ICRC_ERR) 507 if (err & ICRC_ERR)
511 printk("Bad%s ", (err & ABRT_ERR) ? "CRC" : "Sector"); 508 printk((err & ABRT_ERR) ? "BadCRC " : "BadSector ");
512 if (err & ECC_ERR) printk("UncorrectableError "); 509 if (err & ECC_ERR) printk("UncorrectableError ");
513 if (err & ID_ERR) printk("SectorIdNotFound "); 510 if (err & ID_ERR) printk("SectorIdNotFound ");
514 if (err & TRK0_ERR) printk("TrackZeroNotFound "); 511 if (err & TRK0_ERR) printk("TrackZeroNotFound ");
@@ -546,8 +543,8 @@ static u8 ide_dump_ata_status(ide_drive_t *drive, const char *msg, u8 stat)
546 printk(", sector=%llu", 543 printk(", sector=%llu",
547 (unsigned long long)HWGROUP(drive)->rq->sector); 544 (unsigned long long)HWGROUP(drive)->rq->sector);
548 } 545 }
546 printk("\n");
549 } 547 }
550 printk("\n");
551 ide_dump_opcode(drive); 548 ide_dump_opcode(drive);
552 local_irq_restore(flags); 549 local_irq_restore(flags);
553 return err; 550 return err;