X-GM-THRID: 6254148912517480448 X-Received: by 10.25.22.154 with SMTP id 26mr4230974lfw.3.1456243365306; Tue, 23 Feb 2016 08:02:45 -0800 (PST) X-BeenThere: outreachy-kernel@googlegroups.com Received: by 10.28.11.145 with SMTP id 139ls671037wml.53.gmail; Tue, 23 Feb 2016 08:02:44 -0800 (PST) X-Received: by 10.28.6.14 with SMTP id 14mr2029129wmg.6.1456243364628; Tue, 23 Feb 2016 08:02:44 -0800 (PST) Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr. [192.134.164.83]) by gmr-mx.google.com with ESMTPS id s141si1466277wmd.1.2016.02.23.08.02.44 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Feb 2016 08:02:44 -0800 (PST) Received-SPF: neutral (google.com: 192.134.164.83 is neither permitted nor denied by domain of julia.lawall@lip6.fr) client-ip=192.134.164.83; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 192.134.164.83 is neither permitted nor denied by domain of julia.lawall@lip6.fr) smtp.mailfrom=julia.lawall@lip6.fr X-IronPort-AV: E=Sophos;i="5.22,489,1449529200"; d="scan'208";a="204322404" Received: from 198.67.28.109.rev.sfr.net (HELO hadrien) ([109.28.67.198]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 23 Feb 2016 17:02:43 +0100 Date: Tue, 23 Feb 2016 17:02:37 +0100 (CET) From: Julia Lawall X-X-Sender: jll@localhost6.localdomain6 To: Rakhi Sharma cc: outreachy-kernel@googlegroups.com Subject: Re: [Outreachy kernel] [PATCH] staging: luster: lnet: return of an errno should be negative. In-Reply-To: <1456157506-6590-1-git-send-email-rakhish1994@gmail.com> Message-ID: References: <1456157506-6590-1-git-send-email-rakhish1994@gmail.com> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Mon, 22 Feb 2016, Rakhi Sharma wrote: > Return of an errno should typically be negative (ie: return -ENOENT) > , as warning is generated by checkpatch. The comma should be on the line before. Are you sure that that calling context is able to cope with a negative value? You commit message should explain why this is so. julia > > Signed-off-by: Rakhi Sharma > --- > drivers/staging/lustre/lnet/lnet/lib-move.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging/lustre/lnet/lnet/lib-move.c b/drivers/staging/lustre/lnet/lnet/lib-move.c > index fb8f7be0..018949b 100644 > --- a/drivers/staging/lustre/lnet/lnet/lib-move.c > +++ b/drivers/staging/lustre/lnet/lnet/lib-move.c > @@ -1521,7 +1521,7 @@ lnet_parse_reply(lnet_ni_t *ni, lnet_msg_t *msg) > md->md_me->me_portal); > > lnet_res_unlock(cpt); > - return ENOENT; /* +ve: OK but no match */ > + return -ENOENT; /* +ve: OK but no match */ > } > > LASSERT(md->md_offset == 0); > @@ -1536,7 +1536,7 @@ lnet_parse_reply(lnet_ni_t *ni, lnet_msg_t *msg) > rlength, hdr->msg.reply.dst_wmd.wh_object_cookie, > mlength); > lnet_res_unlock(cpt); > - return ENOENT; /* +ve: OK but no match */ > + return -ENOENT; /* +ve: OK but no match */ > } > > CDEBUG(D_NET, "%s: Reply from %s of length %d/%d into md %#llx\n", > -- > 1.9.1 > > -- > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. > To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com. > To post to this group, send email to outreachy-kernel@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1456157506-6590-1-git-send-email-rakhish1994%40gmail.com. > For more options, visit https://groups.google.com/d/optout. >