Linux-mtd Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Norris <computersforpeace@gmail.com>
To: Fabian Frederick <fabf@skynet.be>
Cc: Artem Bityutskiy <dedekind1@gmail.com>,
	linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
	Adrian Hunter <adrian.hunter@intel.com>
Subject: Re: [PATCH 5/6 linux-next] ubifs: remove unnecessary else after break
Date: Tue, 19 May 2015 14:45:58 -0700	[thread overview]
Message-ID: <20150519214558.GZ11598@ld-irv-0074> (raw)
In-Reply-To: <1431726240-4675-5-git-send-email-fabf@skynet.be>

On Fri, May 15, 2015 at 11:43:59PM +0200, Fabian Frederick wrote:
> else is not needed after break in dbg_check_old_index()
> This also solves the {} parity.
> 
> Signed-off-by: Fabian Frederick <fabf@skynet.be>
> ---
>  fs/ubifs/commit.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/ubifs/commit.c b/fs/ubifs/commit.c
> index 63f5661..dd9ba81 100644
> --- a/fs/ubifs/commit.c
> +++ b/fs/ubifs/commit.c
> @@ -680,9 +680,9 @@ int dbg_check_old_index(struct ubifs_info *c, struct ubifs_zbranch *zroot)
>  				if (iip + 1 < le16_to_cpu(idx->child_cnt)) {
>  					iip = iip + 1;
>  					break;
> -				} else
> -					/* Nope, so go up again */
> -					iip = i->iip;
> +				}
> +				/* Nope, so go up again */
> +				iip = i->iip;
>  			}
>  		} else
>  			/* Go down left */

I think the 'else' structure makes things clearer, so I'd personally
just fix the braces. But of course coding style is more opinion than
science.

Brian

  reply	other threads:[~2015-05-19 21:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-15 21:43 [PATCH 1/6 linux-next] ubifs: remove unnecessary semi-colon Fabian Frederick
2015-05-15 21:43 ` [PATCH 2/6 linux-next] ubifs: simplify return in shrink_liability() Fabian Frederick
2015-05-15 21:43 ` [PATCH 3/6 linux-next] ubifs: simplify return in layout_cnodes() Fabian Frederick
2015-05-15 21:43 ` [PATCH 4/6 linux-next] ubifs: simplify return in sort_nodes() Fabian Frederick
2015-05-15 21:43 ` [PATCH 5/6 linux-next] ubifs: remove unnecessary else after break Fabian Frederick
2015-05-19 21:45   ` Brian Norris [this message]
2015-05-15 21:44 ` [PATCH 6/6 linux-next] ubifs: remove else after return Fabian Frederick
2015-05-18 22:17   ` Richard Weinberger
2015-05-19 17:42     ` Fabian Frederick
2015-05-19 17:57       ` Richard Weinberger
2015-05-22 21:37         ` Fabian Frederick
2015-05-22 21:46           ` Richard Weinberger

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=20150519214558.GZ11598@ld-irv-0074 \
    --to=computersforpeace@gmail.com \
    --cc=adrian.hunter@intel.com \
    --cc=dedekind1@gmail.com \
    --cc=fabf@skynet.be \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.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