Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932743AbbLBP25 (ORCPT ); Wed, 2 Dec 2015 10:28:57 -0500 Received: from mx142.netapp.com ([216.240.21.19]:2861 "EHLO mx142.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932226AbbLBP2x (ORCPT ); Wed, 2 Dec 2015 10:28:53 -0500 X-IronPort-AV: E=Sophos;i="5.20,373,1444719600"; d="scan'208";a="80470406" Subject: Re: [PATCH] xprtrdma: add missing curly braces, set rc to zero on non-zero To: Colin King , Trond Myklebust , "J . Bruce Fields" , Jeff Layton , "David S . Miller" , Chuck Lever , Sagi Grimberg , Steve Wise , Doug Ledford , , , References: <1448406701-12474-1-git-send-email-colin.king@canonical.com> From: Anna Schumaker Message-ID: <565F0E2F.7070301@Netapp.com> Date: Wed, 2 Dec 2015 10:28:47 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <1448406701-12474-1-git-send-email-colin.king@canonical.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1265 Lines: 43 On 11/24/2015 06:11 PM, Colin King wrote: > From: Colin Ian King > > Add the missing curly braces so that rc is only set to zero when > it is non-zero. Without this minor fix, rc is set to zero even > when it is zero, which is slightly redundant. > > Detected with smatch static analysis. Thanks for the patch, but I've already have a patch from Dan Carpenter queued up to fix this. Anna > > Signed-off-by: Colin Ian King > --- > net/sunrpc/xprtrdma/verbs.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c > index eadd1655..2cc1014 100644 > --- a/net/sunrpc/xprtrdma/verbs.c > +++ b/net/sunrpc/xprtrdma/verbs.c > @@ -852,10 +852,11 @@ retry: > > if (extras) { > rc = rpcrdma_ep_post_extra_recv(r_xprt, extras); > - if (rc) > + if (rc) { > pr_warn("%s: rpcrdma_ep_post_extra_recv: %i\n", > __func__, rc); > rc = 0; > + } > } > } > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/