* [PATCH 2/2] drivers: block :swim3: fixed the errors on coding style
@ 2013-08-18 19:39 Thiagarajan Thangavel
2013-08-19 2:50 ` Joe Perches
0 siblings, 1 reply; 2+ messages in thread
From: Thiagarajan Thangavel @ 2013-08-18 19:39 UTC (permalink / raw)
To: grant.likely; +Cc: linux-kernel, devicetree
Fixed the coding style errors
Signed-off-by: Thiagarajan Thangavel <write2thiagu@gmail.com>
---
drivers/block/swim3.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/drivers/block/swim3.c b/drivers/block/swim3.c
index a473e25..89c9a85 100644
--- a/drivers/block/swim3.c
+++ b/drivers/block/swim3.c
@@ -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)
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 2/2] drivers: block :swim3: fixed the errors on coding style
2013-08-18 19:39 [PATCH 2/2] drivers: block :swim3: fixed the errors on coding style Thiagarajan Thangavel
@ 2013-08-19 2:50 ` Joe Perches
0 siblings, 0 replies; 2+ messages in thread
From: Joe Perches @ 2013-08-19 2:50 UTC (permalink / raw)
To: Thiagarajan Thangavel; +Cc: grant.likely, linux-kernel, devicetree
On Mon, 2013-08-19 at 01:09 +0530, Thiagarajan Thangavel wrote:
> Fixed the coding style errors
[]
> diff --git a/drivers/block/swim3.c b/drivers/block/swim3.c
[]
> @@ -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);
> @@ -894,7 +894,18 @@ static int fd_eject(struct floppy_state *fs)
[]
> -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
};
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-08-19 2:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-18 19:39 [PATCH 2/2] drivers: block :swim3: fixed the errors on coding style Thiagarajan Thangavel
2013-08-19 2:50 ` Joe Perches
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).