drivers: block :swim3: fixed the errors on coding style
PATCH 2/2 drivers: block :swim3: fixed the errors on coding style
Fixed the coding style errors
Signed-off-by Thiagarajan Thangavel <[email protected]>
--- drivers/block/swim3.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)
drivers/block/swim3.c +13 -2
@@ -783,7 +783,7 @@ static irqreturn_t swim3_interrupt(int irq, void *dev_id)act (fs); }else {swim3_err ("Error %sing block %ld (err=%x)\n" , -rq_data_dir (req) ==WRITE ?"writ" :"read" , +rq_data_dir (req) ==WRITE ?"writ" :"read" , (long )blk_rq_pos (req), err);swim3_end_request (fs, -EIO ,0 ); fs->state = idle;
@@ -894,7 +894,18 @@ static int fd_eject(struct floppy_state *fs)return err; } -static struct floppy_struct floppy_type = {2880 ,18 ,2 ,80 ,0 ,0x1B ,0x00 ,0xCF ,0x6C ,NULL };/* 7 1.44MB 3.5" */ +static struct floppy_struct floppy_type = { +2880 , +18 , +2 , +80 , +0 , +0x1B , +0x00 , +0xCF , +0x6C , +NULL +};/* 7 1.44MB 3.5" */ static int floppy_locked_ioctl (struct block_device *bdev,fmode_t mode,unsigned int cmd,unsigned long param)
Signature · 1 line
1.7.9.5
Quoted 1 line · Thiagarajan Thangavel
Fixed the coding style errors
[]
drivers/block/swim3.c
Quoted 1 line
drivers/block/swim3.c +0
-0
[]
drivers/block/swim3.c static irqreturn_t swim3_interrupt(int irq, void *dev_id) · line 786
Quoted 6 lines
drivers/block/swim3.c +1
-1@@ -783,7 +783,7 @@ static irqreturn_t swim3_interrupt(int irq, void *dev_id)act (fs); }else { swim3_err("Error %sing block %ld (err=%x)\n", - rq_data_dir(req) == WRITE ? "writ" : "read", + rq_data_dir(req) == WRITE ? "writ" : "read",
This looks worse to me.
My preference would be to align the arguments to the open parenthesis and to use full words instead:
swim3_err("Error %s block %ld (err=%x)\n",
rq_data_dir(req) == WRITE ? "writing" : "reading",
(long)blk_rq_pos(req), err);drivers/block/swim3.c static int fd_eject(struct floppy_state *fs)
Quoted 1 line
drivers/block/swim3.c +0
-0@@ -894,7 +894,18 @@ static int fd_eject(struct floppy_state *fs)
[]
drivers/block/swim3.c static int fd_eject(struct floppy_state *fs) · line 908
Quoted 13 lines
drivers/block/swim3.c +12
-1-static struct floppy_struct floppy_type = {2880 ,18 ,2 ,80 ,0 ,0x1B ,0x00 ,0xCF ,0x6C ,NULL };/* 7 1.44MB 3.5" */ +static struct floppy_struct floppy_type = { +2880 , +18 , +2 , +80 , +0 , +0x1B , +0x00 , +0xCF , +0x6C , +NULL +};/* 7 1.44MB 3.5" */
These changes are unattractive to me.
I don't find much wrong with the original though
I would probably have written it as:
static struct floppy_struct floppy_type = { /* 7 1.44MB 3.5" */
2880, 18, 2, 80, 0, 0x1B, 0x00, 0xCF, 0x6C, NULL };