From: Joe Perches <joe@perches.com>
To: Thiagarajan Thangavel <write2thiagu@gmail.com>
Cc: grant.likely@linaro.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH 2/2] drivers: block :swim3: fixed the errors on coding style
Date: Sun, 18 Aug 2013 19:50:44 -0700 [thread overview]
Message-ID: <1376880644.2027.35.camel@joe-AO722> (raw)
In-Reply-To: <1376854740-17580-1-git-send-email-write2thiagu@gmail.com>
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
};
prev parent reply other threads:[~2013-08-19 2:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1376880644.2027.35.camel@joe-AO722 \
--to=joe@perches.com \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=write2thiagu@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).