Commit ded2863d authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds

drivers/block/floppy.c: add __func__ to debugt

Make debugt messages a little neater.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 7f252717
...@@ -616,14 +616,14 @@ static inline void set_debugt(void) ...@@ -616,14 +616,14 @@ static inline void set_debugt(void)
debugtimer = jiffies; debugtimer = jiffies;
} }
static inline void debugt(const char *message) static inline void debugt(const char *func, const char *msg)
{ {
if (DP->flags & DEBUGT) if (DP->flags & DEBUGT)
pr_info("%s dtime=%lu\n", message, jiffies - debugtimer); pr_info("%s:%s dtime=%lu\n", func, msg, jiffies - debugtimer);
} }
#else #else
static inline void set_debugt(void) { } static inline void set_debugt(void) { }
static inline void debugt(const char *message) { } static inline void debugt(const char *func, const char *msg) { }
#endif /* DEBUGT */ #endif /* DEBUGT */
typedef void (*timeout_fn)(unsigned long); typedef void (*timeout_fn)(unsigned long);
...@@ -1533,7 +1533,7 @@ static void setup_rw_floppy(void) ...@@ -1533,7 +1533,7 @@ static void setup_rw_floppy(void)
for (i = 0; i < raw_cmd->cmd_count; i++) for (i = 0; i < raw_cmd->cmd_count; i++)
r |= output_byte(raw_cmd->cmd[i]); r |= output_byte(raw_cmd->cmd[i]);
debugt("rw_command: "); debugt(__func__, "rw_command");
if (r) { if (r) {
cont->error(); cont->error();
...@@ -1556,7 +1556,7 @@ static int blind_seek; ...@@ -1556,7 +1556,7 @@ static int blind_seek;
*/ */
static void seek_interrupt(void) static void seek_interrupt(void)
{ {
debugt("seek interrupt:"); debugt(__func__, "");
if (inr != 2 || (ST0 & 0xF8) != 0x20) { if (inr != 2 || (ST0 & 0xF8) != 0x20) {
DPRINT("seek failed\n"); DPRINT("seek failed\n");
DRS->track = NEED_2_RECAL; DRS->track = NEED_2_RECAL;
...@@ -1604,7 +1604,7 @@ static void seek_floppy(void) ...@@ -1604,7 +1604,7 @@ static void seek_floppy(void)
blind_seek = 0; blind_seek = 0;
debug_dcl(DP->flags, "calling disk change from seek\n"); debug_dcl(DP->flags, "calling disk change from %s\n", __func__);
if (!test_bit(FD_DISK_NEWCHANGE_BIT, &DRS->flags) && if (!test_bit(FD_DISK_NEWCHANGE_BIT, &DRS->flags) &&
disk_change(current_drive) && (raw_cmd->flags & FD_RAW_NEED_DISK)) { disk_change(current_drive) && (raw_cmd->flags & FD_RAW_NEED_DISK)) {
...@@ -1653,18 +1653,18 @@ static void seek_floppy(void) ...@@ -1653,18 +1653,18 @@ static void seek_floppy(void)
reset_fdc(); reset_fdc();
return; return;
} }
debugt("seek command:"); debugt(__func__, "");
} }
static void recal_interrupt(void) static void recal_interrupt(void)
{ {
debugt("recal interrupt:"); debugt(__func__, "");
if (inr != 2) if (inr != 2)
FDCS->reset = 1; FDCS->reset = 1;
else if (ST0 & ST0_ECE) { else if (ST0 & ST0_ECE) {
switch (DRS->track) { switch (DRS->track) {
case NEED_1_RECAL: case NEED_1_RECAL:
debugt("recal interrupt need 1 recal:"); debugt(__func__, "need 1 recal");
/* after a second recalibrate, we still haven't /* after a second recalibrate, we still haven't
* reached track 0. Probably no drive. Raise an * reached track 0. Probably no drive. Raise an
* error, as failing immediately might upset * error, as failing immediately might upset
...@@ -1673,7 +1673,7 @@ static void recal_interrupt(void) ...@@ -1673,7 +1673,7 @@ static void recal_interrupt(void)
cont->redo(); cont->redo();
return; return;
case NEED_2_RECAL: case NEED_2_RECAL:
debugt("recal interrupt need 2 recal:"); debugt(__func__, "need 2 recal");
/* If we already did a recalibrate, /* If we already did a recalibrate,
* and we are not at track 0, this * and we are not at track 0, this
* means we have moved. (The only way * means we have moved. (The only way
...@@ -1687,7 +1687,7 @@ static void recal_interrupt(void) ...@@ -1687,7 +1687,7 @@ static void recal_interrupt(void)
DRS->select_date = jiffies; DRS->select_date = jiffies;
/* fall through */ /* fall through */
default: default:
debugt("recal interrupt default:"); debugt(__func__, "default");
/* Recalibrate moves the head by at /* Recalibrate moves the head by at
* most 80 steps. If after one * most 80 steps. If after one
* recalibrate we don't have reached * recalibrate we don't have reached
...@@ -1777,7 +1777,7 @@ irqreturn_t floppy_interrupt(int irq, void *dev_id) ...@@ -1777,7 +1777,7 @@ irqreturn_t floppy_interrupt(int irq, void *dev_id)
static void recalibrate_floppy(void) static void recalibrate_floppy(void)
{ {
debugt("recalibrate floppy:"); debugt(__func__, "");
do_floppy = recal_interrupt; do_floppy = recal_interrupt;
output_byte(FD_RECALIBRATE); output_byte(FD_RECALIBRATE);
if (output_byte(UNIT(current_drive)) < 0) if (output_byte(UNIT(current_drive)) < 0)
...@@ -1789,7 +1789,7 @@ static void recalibrate_floppy(void) ...@@ -1789,7 +1789,7 @@ static void recalibrate_floppy(void)
*/ */
static void reset_interrupt(void) static void reset_interrupt(void)
{ {
debugt("reset interrupt:"); debugt(__func__, "");
result(); /* get the status ready for set_fdc */ result(); /* get the status ready for set_fdc */
if (FDCS->reset) { if (FDCS->reset) {
pr_info("reset set in interrupt, calling %pf\n", cont->error); pr_info("reset set in interrupt, calling %pf\n", cont->error);
...@@ -2221,7 +2221,7 @@ static void redo_format(void) ...@@ -2221,7 +2221,7 @@ static void redo_format(void)
buffer_track = -1; buffer_track = -1;
setup_format_params(format_req.track << STRETCH(_floppy)); setup_format_params(format_req.track << STRETCH(_floppy));
floppy_start(); floppy_start();
debugt("queue format request"); debugt(__func__, "queue format request");
} }
static struct cont_t format_cont = { static struct cont_t format_cont = {
...@@ -2918,7 +2918,7 @@ static void redo_fd_request(void) ...@@ -2918,7 +2918,7 @@ static void redo_fd_request(void)
if (test_bit(FD_NEED_TWADDLE_BIT, &DRS->flags)) if (test_bit(FD_NEED_TWADDLE_BIT, &DRS->flags))
twaddle(); twaddle();
schedule_bh(floppy_start); schedule_bh(floppy_start);
debugt("queue fd request"); debugt(__func__, "queue fd request");
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment