summaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-03-10 15:20:49 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-12 15:52:29 -0800
commit2300f90e31178f44b0e903c12ea311df1297d7fa (patch)
tree49916344f82136c1c9867afedfd753688088af40 /drivers/block
parentd7b2b2ecd88d06ae212d069a4e187ab690b1636f (diff)
downloadlinux-2300f90e31178f44b0e903c12ea311df1297d7fa.tar.bz2
drivers/block/floppy.c: remove LAST_OUT macro
Macros with hidden returns are not nice. Convert the 2 uses to use direct code. 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.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index 7d1cd21a0ebc..7c0c7d09e089 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -1198,8 +1198,6 @@ static int output_byte(char byte)
return -1;
}
-#define LAST_OUT(x) if (output_byte(x)<0){ reset_fdc();return;}
-
/* gets the response from the fdc */
static int result(void)
{
@@ -1679,7 +1677,10 @@ static void seek_floppy(void)
do_floppy = seek_interrupt;
output_byte(FD_SEEK);
output_byte(UNIT(current_drive));
- LAST_OUT(track);
+ if (output_byte(track) < 0) {
+ reset_fdc();
+ return;
+ }
debugt("seek command:");
}
@@ -1809,7 +1810,10 @@ static void recalibrate_floppy(void)
debugt("recalibrate floppy:");
do_floppy = recal_interrupt;
output_byte(FD_RECALIBRATE);
- LAST_OUT(UNIT(current_drive));
+ if (output_byte(UNIT(current_drive)) < 0) {
+ reset_fdc();
+ return;
+ }
}
/*