From patchwork Fri Dec 21 17:36:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasily Averin X-Patchwork-Id: 10740783 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 B2E7C924 for ; Fri, 21 Dec 2018 17:36:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9F30A284CE for ; Fri, 21 Dec 2018 17:36:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 937EF285CD; Fri, 21 Dec 2018 17:36:10 +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 532A0284CE for ; Fri, 21 Dec 2018 17:36:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387683AbeLURgJ (ORCPT ); Fri, 21 Dec 2018 12:36:09 -0500 Received: from relay.sw.ru ([185.231.240.75]:40952 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730364AbeLURgJ (ORCPT ); Fri, 21 Dec 2018 12:36:09 -0500 Received: from [172.16.24.21] by relay.sw.ru with esmtp (Exim 4.91) (envelope-from ) id 1gaOiU-0004vy-GA; Fri, 21 Dec 2018 20:36:06 +0300 From: Vasily Averin Subject: [PATCH v3 7/8] sunrpc: fix debug message in svc_create_xprt() To: Trond Myklebust , Anna Schumaker Cc: "J. Bruce Fields" , Jeff Layton , Chuck Lever , linux-nfs@vger.kernel.org, Evgenii Shatokhin References: Message-ID: <5ee97efb-e944-189d-e7b6-d6ca9ac31e39@virtuozzo.com> Date: Fri, 21 Dec 2018 20:36:05 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: 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 Reviewed-by: Jeff Layton Signed-off-by: Vasily Averin --- 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 728ccd4d4490..834fedb441ef 100644 --- a/net/sunrpc/svc_xprt.c +++ b/net/sunrpc/svc_xprt.c @@ -301,9 +301,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);