From: Colin Ian King <colin.king@canonical.com>
To: "David S . Miller" <davem@davemloft.net>, netdev@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fix a couple of indentation issues and remove assignment in if statements
Date: Thu, 17 Jan 2019 00:34:25 +0000 [thread overview]
Message-ID: <91ca2065-a3d0-d163-6f28-8cdeb5c693b8@canonical.com> (raw)
In-Reply-To: <20190117003333.30605-1-colin.king@canonical.com>
Bah, forgot to fix up the subject line properly. V3. Coming.
On 17/01/2019 00:33, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> There is an if statement and a return statement that are incorrectly
> indented. Fix these. Also replace the assignment-in-if statements
> to assignment followed by an if to keep to the coding style.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>
> V2: also clean up the assignment-in-if statements too
>
> ---
>
> drivers/net/sb1000.c | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/sb1000.c b/drivers/net/sb1000.c
> index 7820fced33f6..941cfa8f1c2a 100644
> --- a/drivers/net/sb1000.c
> +++ b/drivers/net/sb1000.c
> @@ -535,17 +535,20 @@ sb1000_activate(const int ioaddr[], const char* name)
> int status;
>
> ssleep(1);
> - if ((status = card_send_command(ioaddr, name, Command0, st)))
> + status = card_send_command(ioaddr, name, Command0, st);
> + if (status)
> return status;
> - if ((status = card_send_command(ioaddr, name, Command1, st)))
> + status = card_send_command(ioaddr, name, Command1, st);
> + if (status)
> return status;
> if (st[3] != 0xf1) {
> - if ((status = sb1000_start_get_set_command(ioaddr, name)))
> + status = sb1000_start_get_set_command(ioaddr, name);
> + if (status)
> return status;
> return -EIO;
> }
> udelay(1000);
> - return sb1000_start_get_set_command(ioaddr, name);
> + return sb1000_start_get_set_command(ioaddr, name);
> }
>
> /* get SB1000 firmware version */
>
prev parent reply other threads:[~2019-01-17 0:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-17 0:33 Colin King
2019-01-17 0:34 ` Colin Ian King [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=91ca2065-a3d0-d163-6f28-8cdeb5c693b8@canonical.com \
--to=colin.king@canonical.com \
--cc=davem@davemloft.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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
all inboxes | Powered by JetHome®