aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-03-10 18:21:05 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-12 18:52:31 -0500
commit891eda80a5227a12956d7997baf9f4b54a9aa4f9 (patch)
treefce30470d36724d4646acf68a1fb61e047a003b1 /drivers/block
parent1a23d133359eec2297ff4c72c260ccacb156d883 (diff)
drivers/block/floppy.c: DPRINT neatening
Move DPRINT macro definition above 1st use Consolidate a format string (>80 columns) Add a newline to an unterminated message Comment neatened 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.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index c2d9c59f0e64..613c279afcf1 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -149,8 +149,11 @@
149#define REALLY_SLOW_IO 149#define REALLY_SLOW_IO
150 150
151#define DEBUGT 2 151#define DEBUGT 2
152#define DCL_DEBUG /* debug disk change line */
153 152
153#define DPRINT(format, args...) \
154 pr_info("floppy%d: " format, current_drive, ##args)
155
156#define DCL_DEBUG /* debug disk change line */
154#ifdef DCL_DEBUG 157#ifdef DCL_DEBUG
155#define debug_dcl(test, fmt, args...) \ 158#define debug_dcl(test, fmt, args...) \
156 do { if ((test) & FD_DEBUG) DPRINT(fmt, ##args); } while (0) 159 do { if ((test) & FD_DEBUG) DPRINT(fmt, ##args); } while (0)
@@ -159,7 +162,6 @@
159 do { if (0) DPRINT(fmt, ##args); } while (0) 162 do { if (0) DPRINT(fmt, ##args); } while (0)
160#endif 163#endif
161 164
162
163/* do print messages for unexpected interrupts */ 165/* do print messages for unexpected interrupts */
164static int print_unex = 1; 166static int print_unex = 1;
165#include <linux/module.h> 167#include <linux/module.h>
@@ -308,9 +310,6 @@ static bool initialized;
308#define UDRWE (&write_errors[drive]) 310#define UDRWE (&write_errors[drive])
309#define UFDCS (&fdc_state[FDC(drive)]) 311#define UFDCS (&fdc_state[FDC(drive)])
310 312
311#define DPRINT(format, args...) \
312 pr_info("floppy%d: " format, current_drive, ##args)
313
314#define PH_HEAD(floppy, head) (((((floppy)->stretch & 2) >> 1) ^ head) << 2) 313#define PH_HEAD(floppy, head) (((((floppy)->stretch & 2) >> 1) ^ head) << 2)
315#define STRETCH(floppy) ((floppy)->stretch & FD_STRETCH) 314#define STRETCH(floppy) ((floppy)->stretch & FD_STRETCH)
316 315
@@ -345,7 +344,7 @@ static bool initialized;
345 */ 344 */
346#define MAX_REPLIES 16 345#define MAX_REPLIES 16
347static unsigned char reply_buffer[MAX_REPLIES]; 346static unsigned char reply_buffer[MAX_REPLIES];
348static int inr; /* size of reply buffer, when called from interrupt */ 347static int inr; /* size of reply buffer, when called from interrupt */
349#define ST0 (reply_buffer[0]) 348#define ST0 (reply_buffer[0])
350#define ST1 (reply_buffer[1]) 349#define ST1 (reply_buffer[1])
351#define ST2 (reply_buffer[2]) 350#define ST2 (reply_buffer[2])
@@ -755,8 +754,7 @@ static int disk_change(int drive)
755 if (UDRS->keep_data >= 0) { 754 if (UDRS->keep_data >= 0) {
756 if ((UDP->flags & FTD_MSG) && 755 if ((UDP->flags & FTD_MSG) &&
757 current_type[drive] != NULL) 756 current_type[drive] != NULL)
758 DPRINT("Disk type is undefined after " 757 DPRINT("Disk type is undefined after disk change\n");
759 "disk change\n");
760 current_type[drive] = NULL; 758 current_type[drive] = NULL;
761 floppy_sizes[TOMINOR(drive)] = MAX_DISK_SIZE << 1; 759 floppy_sizes[TOMINOR(drive)] = MAX_DISK_SIZE << 1;
762 } 760 }
@@ -1447,7 +1445,7 @@ static int interpret_errors(void)
1447 char bad; 1445 char bad;
1448 1446
1449 if (inr != 7) { 1447 if (inr != 7) {
1450 DPRINT("-- FDC reply error"); 1448 DPRINT("-- FDC reply error\n");
1451 FDCS->reset = 1; 1449 FDCS->reset = 1;
1452 return 1; 1450 return 1;
1453 } 1451 }