* PATCH: IDE - fix various comments remove never changing ifdef
@ 2004-08-15 14:35 Alan Cox
2004-08-16 18:29 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 3+ messages in thread
From: Alan Cox @ 2004-08-15 14:35 UTC (permalink / raw)
To: linux-ide, linux-kernel, torvalds
No code changes in this patch just documenting
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.8-rc3/drivers/ide/ide.c linux-2.6.8-rc3/drivers/ide/ide.c
--- linux.vanilla-2.6.8-rc3/drivers/ide/ide.c 2004-08-09 15:51:00.000000000 +0100
+++ linux-2.6.8-rc3/drivers/ide/ide.c 2004-08-12 17:55:05.000000000 +0100
@@ -347,10 +405,15 @@
return system_bus_speed;
}
-/*
- * current_capacity() returns the capacity (in sectors) of a drive
- * according to its current geometry/LBA settings.
+/**
+ * current_capacity - drive capacity
+ * @drive: drive to query
+ *
+ * Return the current capacity (in sectors) of a drive according to
+ * its current geometry/LBA settings. Empty removables are reported
+ * as size zero
*/
+
sector_t current_capacity (ide_drive_t *drive)
{
if (!drive->present)
@@ -360,9 +423,17 @@
EXPORT_SYMBOL(current_capacity);
-/*
- * Error reporting, in human readable form (luxurious, but a memory hog).
+/**
+ * ide_dump_status - translate ATA error
+ * @drive: drive the error occured on
+ * @msg: information string
+ * @stat: status byte
+ *
+ * Error reporting, in human readable form (luxurious, but a memory hog).
+ * Combines the drive name, message and status byte to provide a
+ * user understandable explanation of the device error.
*/
+
u8 ide_dump_status (ide_drive_t *drive, const char *msg, u8 stat)
{
ide_hwif_t *hwif = HWIF(drive);
@@ -371,7 +442,6 @@
local_irq_set(flags);
printk(KERN_WARNING "%s: %s: status=0x%02x", drive->name, msg, stat);
-#if FANCY_STATUS_DUMPS
printk(" { ");
if (stat & BUSY_STAT) {
printk("Busy ");
@@ -385,12 +455,10 @@
if (stat & ERR_STAT) printk("Error ");
}
printk("}");
-#endif /* FANCY_STATUS_DUMPS */
printk("\n");
if ((stat & (BUSY_STAT|ERR_STAT)) == ERR_STAT) {
err = hwif->INB(IDE_ERROR_REG);
printk("%s: %s: error=0x%02x", drive->name, msg, err);
-#if FANCY_STATUS_DUMPS
if (drive->media == ide_disk) {
printk(" { ");
if (err & ABRT_ERR) printk("DriveStatusError ");
@@ -434,7 +502,6 @@
printk(", sector=%llu", (unsigned long long)HWGROUP(drive)->rq->sector);
}
}
-#endif /* FANCY_STATUS_DUMPS */
printk("\n");
}
local_irq_restore(flags);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: PATCH: IDE - fix various comments remove never changing ifdef
2004-08-16 18:29 ` Bartlomiej Zolnierkiewicz
@ 2004-08-16 18:27 ` Alan Cox
0 siblings, 0 replies; 3+ messages in thread
From: Alan Cox @ 2004-08-16 18:27 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz
Cc: Alan Cox, linux-ide, Linux Kernel Mailing List, torvalds
On Llu, 2004-08-16 at 19:29, Bartlomiej Zolnierkiewicz wrote:
> On Sunday 15 August 2004 16:35, Alan Cox wrote:
> > No code changes in this patch just documenting
>
> If you want to remove FANCY_STATUS_DUMPS define please make
> a separate patch and remove it globally.
Will do.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: PATCH: IDE - fix various comments remove never changing ifdef
2004-08-15 14:35 PATCH: IDE - fix various comments remove never changing ifdef Alan Cox
@ 2004-08-16 18:29 ` Bartlomiej Zolnierkiewicz
2004-08-16 18:27 ` Alan Cox
0 siblings, 1 reply; 3+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2004-08-16 18:29 UTC (permalink / raw)
To: Alan Cox; +Cc: linux-ide, linux-kernel, torvalds
On Sunday 15 August 2004 16:35, Alan Cox wrote:
> No code changes in this patch just documenting
If you want to remove FANCY_STATUS_DUMPS define please make
a separate patch and remove it globally.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-08-16 19:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-15 14:35 PATCH: IDE - fix various comments remove never changing ifdef Alan Cox
2004-08-16 18:29 ` Bartlomiej Zolnierkiewicz
2004-08-16 18:27 ` Alan Cox
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).