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

drivers/block/floppy.c: remove CLEARSTRUCT macro, use memset

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 bb57f0c6
...@@ -314,8 +314,6 @@ static int initialising = 1; ...@@ -314,8 +314,6 @@ static int initialising = 1;
#define PH_HEAD(floppy, head) (((((floppy)->stretch & 2) >> 1) ^ head) << 2) #define PH_HEAD(floppy, head) (((((floppy)->stretch & 2) >> 1) ^ head) << 2)
#define STRETCH(floppy) ((floppy)->stretch & FD_STRETCH) #define STRETCH(floppy) ((floppy)->stretch & FD_STRETCH)
#define CLEARSTRUCT(x) memset((x), 0, sizeof(*(x)))
/* read/write */ /* read/write */
#define COMMAND (raw_cmd->cmd[0]) #define COMMAND (raw_cmd->cmd[0])
#define DR_SELECT (raw_cmd->cmd[1]) #define DR_SELECT (raw_cmd->cmd[1])
...@@ -3509,7 +3507,7 @@ static int fd_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd, ...@@ -3509,7 +3507,7 @@ static int fd_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd,
return -EINVAL; return -EINVAL;
/* copyin */ /* copyin */
CLEARSTRUCT(&inparam); memset(&inparam, 0, sizeof(inparam));
if (_IOC_DIR(cmd) & _IOC_WRITE) if (_IOC_DIR(cmd) & _IOC_WRITE)
ECALL(fd_copyin((void __user *)param, &inparam, size)) ECALL(fd_copyin((void __user *)param, &inparam, size))
...@@ -3598,7 +3596,7 @@ static int fd_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd, ...@@ -3598,7 +3596,7 @@ static int fd_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd,
OUT(FDGETFDCSTAT, UFDCS); OUT(FDGETFDCSTAT, UFDCS);
case FDWERRORCLR: case FDWERRORCLR:
CLEARSTRUCT(UDRWE); memset(UDRWE, 0, sizeof(*UDRWE));
return 0; return 0;
OUT(FDWERRORGET, UDRWE); OUT(FDWERRORGET, UDRWE);
...@@ -4260,7 +4258,7 @@ static int __init floppy_init(void) ...@@ -4260,7 +4258,7 @@ static int __init floppy_init(void)
for (i = 0; i < N_FDC; i++) { for (i = 0; i < N_FDC; i++) {
fdc = i; fdc = i;
CLEARSTRUCT(FDCS); memset(FDCS, 0, sizeof(*FDCS));
FDCS->dtr = -1; FDCS->dtr = -1;
FDCS->dor = 0x4; FDCS->dor = 0x4;
#if defined(__sparc__) || defined(__mc68000__) #if defined(__sparc__) || defined(__mc68000__)
...@@ -4293,8 +4291,8 @@ static int __init floppy_init(void) ...@@ -4293,8 +4291,8 @@ static int __init floppy_init(void)
/* initialise drive state */ /* initialise drive state */
for (drive = 0; drive < N_DRIVE; drive++) { for (drive = 0; drive < N_DRIVE; drive++) {
CLEARSTRUCT(UDRS); memset(UDRS, 0, sizeof(*UDRS));
CLEARSTRUCT(UDRWE); memset(UDRWE, 0, sizeof(*UDRWE));
USETF(FD_DISK_NEWCHANGE); USETF(FD_DISK_NEWCHANGE);
USETF(FD_DISK_CHANGED); USETF(FD_DISK_CHANGED);
USETF(FD_VERIFY); USETF(FD_VERIFY);
......
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