All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jes Sorensen <jes.sorensen@gmail.com>
To: aybuke ozdemir <aybuke.147@gmail.com>,
	 outreachy-kernel@googlegroups.com
Subject: Re: [Outreachy kernel] [PATCH] Staging: lustre: Remove unnecessary else after return
Date: Fri, 20 Feb 2015 16:16:53 -0500	[thread overview]
Message-ID: <54E7A445.609@gmail.com> (raw)
In-Reply-To: <1424466318-9550-1-git-send-email-aybuke.147@gmail.com>

On 02/20/15 16:05, aybuke ozdemir wrote:
> This patch fixes "else is not generally useful after
> a break or return" checkpatch.pl warning using goto statement in lcommon_cl.c
> 
> Signed-off-by: aybuke ozdemir <aybuke.147@gmail.com>
> ---
>  drivers/staging/lustre/lustre/lclient/lcommon_cl.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Looks good to me.

Jes


> diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c
> index 23095bb..b8311c6 100644
> --- a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c
> +++ b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c
> @@ -834,7 +834,7 @@ int ccc_prep_size(const struct lu_env *env, struct cl_object *obj,
>  				    size_index < cur_index)
>  					*exceed = 1;
>  			}
> -			return result;
> +			goto out;
>  		} else {
>  			/*
>  			 * region is within kms and, hence, within real file
> @@ -857,6 +857,7 @@ int ccc_prep_size(const struct lu_env *env, struct cl_object *obj,
>  		}
>  	}
>  	ccc_object_size_unlock(obj);
> +out:
>  	return result;
>  }
>  
> 



  reply	other threads:[~2015-02-20 21:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-20 21:05 [PATCH] Staging: lustre: Remove unnecessary else after return aybuke ozdemir
2015-02-20 21:16 ` Jes Sorensen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-03-01  4:59 Haneen Mohammed
2015-03-02  0:48 ` [Outreachy kernel] " Greg KH

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=54E7A445.609@gmail.com \
    --to=jes.sorensen@gmail.com \
    --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.