From patchwork Mon Dec 17 16:26:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasily Averin X-Patchwork-Id: 10733805 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 01E8F13BF for ; Mon, 17 Dec 2018 16:26:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E6E052A1D8 for ; Mon, 17 Dec 2018 16:26:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DBA5F2A1DA; Mon, 17 Dec 2018 16:26:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 894D82A1D8 for ; Mon, 17 Dec 2018 16:26:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727860AbeLQQ0R (ORCPT ); Mon, 17 Dec 2018 11:26:17 -0500 Received: from relay.sw.ru ([185.231.240.75]:51872 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727814AbeLQQ0Q (ORCPT ); Mon, 17 Dec 2018 11:26:16 -0500 Received: from [172.16.24.21] by relay.sw.ru with esmtp (Exim 4.91) (envelope-from ) id 1gYvig-00010q-1c; Mon, 17 Dec 2018 19:26:14 +0300 From: Vasily Averin Subject: [PATCH 4/4] nfs: fix debug message in svc_create_xprt() To: "J. Bruce Fields" , Jeff Layton , Trond Myklebust , Anna Schumaker Cc: Chuck Lever , linux-nfs@vger.kernel.org, Evgenii Shatokhin , Konstantin Khorenko Message-ID: Date: Mon, 17 Dec 2018 19:26:13 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 Content-Language: en-US Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP _svc_create_xprt() returns positive port number so its non-zero return value is not an error Signed-off-by: Vasily Averin Reviewed-by: Jeff Layton --- net/sunrpc/svc_xprt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c index 51d36230b6e3..130af22d5c66 100644 --- a/net/sunrpc/svc_xprt.c +++ b/net/sunrpc/svc_xprt.c @@ -296,9 +296,9 @@ int svc_create_xprt(struct svc_serv *serv, const char *xprt_name, request_module("svc%s", xprt_name); err = _svc_create_xprt(serv, xprt_name, net, family, port, flags); } - if (err) + if (err < 0) dprintk("svc: transport %s not found, err %d\n", - xprt_name, err); + xprt_name, -err); return err; } EXPORT_SYMBOL_GPL(svc_create_xprt);