From patchwork Tue Jan 5 09:52:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 7953501 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B5F51BEEE5 for ; Tue, 5 Jan 2016 09:53:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 048DB2039E for ; Tue, 5 Jan 2016 09:53:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 273CF202EC for ; Tue, 5 Jan 2016 09:53:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751510AbcAEJxV (ORCPT ); Tue, 5 Jan 2016 04:53:21 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:28289 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751456AbcAEJxU (ORCPT ); Tue, 5 Jan 2016 04:53:20 -0500 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u059qwW8031582 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Tue, 5 Jan 2016 09:52:58 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u059qvj0003327 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Tue, 5 Jan 2016 09:52:57 GMT Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id u059qvuu000757; Tue, 5 Jan 2016 09:52:57 GMT Received: from mwanda (/154.0.139.178) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 05 Jan 2016 01:52:56 -0800 Date: Tue, 5 Jan 2016 12:52:49 +0300 From: Dan Carpenter To: "J. Bruce Fields" , Chuck Lever Cc: Anna Schumaker , "J. Bruce Fields" , Jeff Layton , Ray Jui , Scott Branden , Jon Mason , Chuck Lever , Doug Ledford , Steve Wise , Sagi Grimberg , Michael Wang , linux-nfs@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch -next] svcrdma: fix a couple warning messages Message-ID: <20160105095249.GB23619@mwanda> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The WARN_ON_ONCE() macro takes a condition, passing it this string literal sort of works as intended but it's better to use WARN_ONCE() instead. Signed-off-by: Dan Carpenter --- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c index abfbd02..4b397ad 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_transport.c +++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c @@ -221,7 +221,7 @@ out_empty: spin_lock_bh(&xprt->sc_ctxt_lock); xprt->sc_ctxt_used--; spin_unlock_bh(&xprt->sc_ctxt_lock); - WARN_ON_ONCE("svcrdma: empty RDMA ctxt list?\n"); + WARN_ONCE(1, "svcrdma: empty RDMA ctxt list?\n"); return NULL; } @@ -328,7 +328,7 @@ out_empty: if (map) goto out; - WARN_ON_ONCE("svcrdma: empty request map list?\n"); + WARN_ONCE(1, "svcrdma: empty request map list?\n"); return NULL; }