aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-03-10 18:21:09 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-12 18:52:31 -0500
commitded2863d09208b27baa4a6ad95bb7e5539e48c05 (patch)
treea974104fe50bab2e8a213db30d3076ac580b859f /drivers/block
parent7f2527174ab1ee7f4550c91be47b3f843ff1316d (diff)
drivers/block/floppy.c: add __func__ to debugt
Make debugt messages a little neater. Signed-off-by: Joe 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: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/floppy.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index b7190fd582f4..1fe5225a3829 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -616,14 +616,14 @@ static inline void set_debugt(void)
616 debugtimer = jiffies; 616 debugtimer = jiffies;
617} 617}
618 618
619static inline void debugt(const char *message) 619static inline void debugt(const char *func, const char *msg)
620{ 620{
621 if (DP->flags & DEBUGT) 621 if (DP->flags & DEBUGT)
622 pr_info("%s dtime=%lu\n", message, jiffies - debugtimer); 622 pr_info("%s:%s dtime=%lu\n", func, msg, jiffies - debugtimer);
623} 623}
624#else 624#else
625static inline void set_debugt(void) { } 625static inline void set_debugt(void) { }
626static inline void debugt(const char *message) { } 626static inline void debugt(const char *func, const char *msg) { }
627#endif /* DEBUGT */ 627#endif /* DEBUGT */
628 628
629typedef void (*timeout_fn)(unsigned long); 629typedef void (*timeout_fn)(unsigned long);
@@ -1533,7 +1533,7 @@ static void setup_rw_floppy(void)
1533 for (i = 0; i < raw_cmd->cmd_count; i++) 1533 for (i = 0; i < raw_cmd->cmd_count; i++)
1534 r |= output_byte(raw_cmd->cmd[i]); 1534 r |= output_byte(raw_cmd->cmd[i]);
1535 1535
1536 debugt("rw_command: "); 1536 debugt(__func__, "rw_command");
1537 1537
1538 if (r) { 1538 if (r) {
1539 cont->error(); 1539 cont->error();
@@ -1556,7 +1556,7 @@ static int blind_seek;
1556 */ 1556 */
1557static void seek_interrupt(void) 1557static void seek_interrupt(void)
1558{ 1558{
1559 debugt("seek interrupt:"); 1559 debugt(__func__, "");
1560 if (inr != 2 || (ST0 & 0xF8) != 0x20) { 1560 if (inr != 2 || (ST0 & 0xF8) != 0x20) {
1561 DPRINT("seek failed\n"); 1561 DPRINT("seek failed\n");
1562 DRS->track = NEED_2_RECAL; 1562 DRS->track = NEED_2_RECAL;
@@ -1604,7 +1604,7 @@ static void seek_floppy(void)
1604 1604
1605 blind_seek = 0; 1605 blind_seek = 0;
1606 1606
1607 debug_dcl(DP->flags, "calling disk change from seek\n"); 1607 debug_dcl(DP->flags, "calling disk change from %s\n", __func__);
1608 1608
1609 if (!test_bit(FD_DISK_NEWCHANGE_BIT, &DRS->flags) && 1609 if (!test_bit(FD_DISK_NEWCHANGE_BIT, &DRS->flags) &&
1610 disk_change(current_drive) && (raw_cmd->flags & FD_RAW_NEED_DISK)) { 1610 disk_change(current_drive) && (raw_cmd->flags & FD_RAW_NEED_DISK)) {
@@ -1653,18 +1653,18 @@ static void seek_floppy(void)
1653 reset_fdc(); 1653 reset_fdc();
1654 return; 1654 return;
1655 } 1655 }
1656 debugt("seek command:"); 1656 debugt(__func__, "");
1657} 1657}
1658 1658
1659static void recal_interrupt(void) 1659static void recal_interrupt(void)
1660{ 1660{
1661 debugt("recal interrupt:"); 1661 debugt(__func__, "");
1662 if (inr != 2) 1662 if (inr != 2)
1663 FDCS->reset = 1; 1663 FDCS->reset = 1;
1664 else if (ST0 & ST0_ECE) { 1664 else if (ST0 & ST0_ECE) {
1665 switch (DRS->track) { 1665 switch (DRS->track) {
1666 case NEED_1_RECAL: 1666 case NEED_1_RECAL:
1667 debugt("recal interrupt need 1 recal:"); 1667 debugt(__func__, "need 1 recal");
1668 /* after a second recalibrate, we still haven't 1668 /* after a second recalibrate, we still haven't
1669 * reached track 0. Probably no drive. Raise an 1669 * reached track 0. Probably no drive. Raise an
1670 * error, as failing immediately might upset 1670 * error, as failing immediately might upset
@@ -1673,7 +1673,7 @@ static void recal_interrupt(void)
1673 cont->redo(); 1673 cont->redo();
1674 return; 1674 return;
1675 case NEED_2_RECAL: 1675 case NEED_2_RECAL:
1676 debugt("recal interrupt need 2 recal:"); 1676 debugt(__func__, "need 2 recal");
1677 /* If we already did a recalibrate, 1677 /* If we already did a recalibrate,
1678 * and we are not at track 0, this 1678 * and we are not at track 0, this
1679 * means we have moved. (The only way 1679 * means we have moved. (The only way
@@ -1687,7 +1687,7 @@ static void recal_interrupt(void)
1687 DRS->select_date = jiffies; 1687 DRS->select_date = jiffies;
1688 /* fall through */ 1688 /* fall through */
1689 default: 1689 default:
1690 debugt("recal interrupt default:"); 1690 debugt(__func__, "default");
1691 /* Recalibrate moves the head by at 1691 /* Recalibrate moves the head by at
1692 * most 80 steps. If after one 1692 * most 80 steps. If after one
1693 * recalibrate we don't have reached 1693 * recalibrate we don't have reached
@@ -1777,7 +1777,7 @@ irqreturn_t floppy_interrupt(int irq, void *dev_id)
1777 1777
1778static void recalibrate_floppy(void) 1778static void recalibrate_floppy(void)
1779{ 1779{
1780 debugt("recalibrate floppy:"); 1780 debugt(__func__, "");
1781 do_floppy = recal_interrupt; 1781 do_floppy = recal_interrupt;
1782 output_byte(FD_RECALIBRATE); 1782 output_byte(FD_RECALIBRATE);
1783 if (output_byte(UNIT(current_drive)) < 0) 1783 if (output_byte(UNIT(current_drive)) < 0)
@@ -1789,7 +1789,7 @@ static void recalibrate_floppy(void)
1789 */ 1789 */
1790static void reset_interrupt(void) 1790static void reset_interrupt(void)
1791{ 1791{
1792 debugt("reset interrupt:"); 1792 debugt(__func__, "");
1793 result(); /* get the status ready for set_fdc */ 1793 result(); /* get the status ready for set_fdc */
1794 if (FDCS->reset) { 1794 if (FDCS->reset) {
1795 pr_info("reset set in interrupt, calling %pf\n", cont->error); 1795 pr_info("reset set in interrupt, calling %pf\n", cont->error);
@@ -2221,7 +2221,7 @@ static void redo_format(void)
2221 buffer_track = -1; 2221 buffer_track = -1;
2222 setup_format_params(format_req.track << STRETCH(_floppy)); 2222 setup_format_params(format_req.track << STRETCH(_floppy));
2223 floppy_start(); 2223 floppy_start();
2224 debugt("queue format request"); 2224 debugt(__func__, "queue format request");
2225} 2225}
2226 2226
2227static struct cont_t format_cont = { 2227static struct cont_t format_cont = {
@@ -2918,7 +2918,7 @@ do_request:
2918 if (test_bit(FD_NEED_TWADDLE_BIT, &DRS->flags)) 2918 if (test_bit(FD_NEED_TWADDLE_BIT, &DRS->flags))
2919 twaddle(); 2919 twaddle();
2920 schedule_bh(floppy_start); 2920 schedule_bh(floppy_start);
2921 debugt("queue fd request"); 2921 debugt(__func__, "queue fd request");
2922 return; 2922 return;
2923} 2923}
2924 2924