From: Greg KH <gregkh@linuxfoundation.org>
To: Redha Gouicem <redha.gouicem@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] Staging: lustre: lnet: lnet: router.c: fix useless statements
Date: Wed, 18 Mar 2015 23:01:11 +0100 [thread overview]
Message-ID: <20150318220111.GA20501@kroah.com> (raw)
In-Reply-To: <1426715147-15371-2-git-send-email-redha.gouicem@gmail.com>
On Wed, Mar 18, 2015 at 10:45:47PM +0100, Redha Gouicem wrote:
> This patch removes useless returns and elses.
>
> Signed-off-by: Redha Gouicem <redha.gouicem@gmail.com>
> ---
> drivers/staging/lustre/lnet/lnet/router.c | 15 ++++-----------
> 1 file changed, 4 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/staging/lustre/lnet/lnet/router.c b/drivers/staging/lustre/lnet/lnet/router.c
> index 89a29b7..6fe79e2 100644
> --- a/drivers/staging/lustre/lnet/lnet/router.c
> +++ b/drivers/staging/lustre/lnet/lnet/router.c
> @@ -270,7 +270,6 @@ static void lnet_shuffle_seed(void)
> do_gettimeofday(&tv);
> cfs_srand(tv.tv_sec ^ seed[0], tv.tv_usec ^ seed[1]);
> seeded = 1;
> - return;
> }
>
> /* NB expects LNET_LOCK held */
> @@ -357,11 +356,10 @@ lnet_add_route(__u32 net, unsigned int hops, lnet_nid_t gateway,
>
> if (rc == -EHOSTUNREACH) { /* gateway is not on a local net */
> return 0; /* ignore the route entry */
> - } else {
> - CERROR("Error %d creating route %s %d %s\n", rc,
> - libcfs_net2str(net), hops,
> - libcfs_nid2str(gateway));
> - }
> + CERROR("Error %d creating route %s %d %s\n", rc,
> + libcfs_net2str(net), hops,
> + libcfs_nid2str(gateway));
> +
> return rc;
> }
>
This change broke the build :(
Please always test build your changes, cna you fix it up and resend?
thanks,
greg k-h
next prev parent reply other threads:[~2015-03-18 22:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-18 21:45 [PATCH 1/2] Staging: lustre: lnet: lnet: router.c : fix 80 char limit Redha Gouicem
2015-03-18 21:45 ` [PATCH 2/2] Staging: lustre: lnet: lnet: router.c: fix useless statements Redha Gouicem
2015-03-18 22:01 ` Greg KH [this message]
2015-03-18 21:59 ` [PATCH 1/2] Staging: lustre: lnet: lnet: router.c : fix 80 char limit 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=20150318220111.GA20501@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=redha.gouicem@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
Powered by JetHome