All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: aybuke ozdemir <aybuke.147@gmail.com>
Cc: outreachy-kernel@googlegroups.com
Subject: Re: [Outreachy kernel] [PATCH v2] Staging: lustre: lustre: fid: Remove unnecessary else after return
Date: Thu, 26 Feb 2015 10:25:22 -0800	[thread overview]
Message-ID: <20150226182522.GA23634@kroah.com> (raw)
In-Reply-To: <1424461139-8191-1-git-send-email-aybuke.147@gmail.com>

On Fri, Feb 20, 2015 at 09:38:59PM +0200, aybuke ozdemir wrote:
> This patch fixes "else is not generally useful after
> a break or return" checkpatch.pl warning using goto statement in fid_request.c
> 
> Signed-off-by: aybuke ozdemir <aybuke.147@gmail.com>
> ---
> Changes since v1:
> * removed the "else" block instead of goto statement was used and
> a commit message has been corrected.
> ---
>  drivers/staging/lustre/lustre/fid/fid_request.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/lustre/lustre/fid/fid_request.c b/drivers/staging/lustre/lustre/fid/fid_request.c
> index 063441a..a3a300e 100644
> --- a/drivers/staging/lustre/lustre/fid/fid_request.c
> +++ b/drivers/staging/lustre/lustre/fid/fid_request.c
> @@ -200,7 +200,7 @@ static int seq_client_alloc_seq(const struct lu_env *env,
>  		if (rc) {
>  			CERROR("%s: Can't allocate new meta-sequence, rc %d\n",
>  			       seq->lcs_name, rc);
> -			return rc;
> +			goto out;

No need for this, just remove the else line below here instead.

>  		} else {
>  			CDEBUG(D_INFO, "%s: New range - "DRANGE"\n",
>  			       seq->lcs_name, PRANGE(&seq->lcs_space));

thanks,

greg k-h


      reply	other threads:[~2015-02-26 18:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-20 19:38 [PATCH v2] Staging: lustre: lustre: fid: Remove unnecessary else after return aybuke ozdemir
2015-02-26 18:25 ` Greg KH [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=20150226182522.GA23634@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=aybuke.147@gmail.com \
    --cc=outreachy-kernel@googlegroups.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.