From patchwork Wed Jun 13 12:01:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 10462111 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3606B60329 for ; Wed, 13 Jun 2018 12:01:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2532028958 for ; Wed, 13 Jun 2018 12:01:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 182B028962; Wed, 13 Jun 2018 12:01:44 +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 A9DE628958 for ; Wed, 13 Jun 2018 12:01:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935244AbeFMMBm (ORCPT ); Wed, 13 Jun 2018 08:01:42 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:34246 "EHLO andre.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935286AbeFMMBl (ORCPT ); Wed, 13 Jun 2018 08:01:41 -0400 Received: from ayla.of.borg ([84.194.111.163]) by andre.telenet-ops.be with bizsmtp id yC1f1x00C3XaVaC01C1f7x; Wed, 13 Jun 2018 14:01:40 +0200 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.86_2) (envelope-from ) id 1fT4T5-0002B3-6F; Wed, 13 Jun 2018 14:01:39 +0200 Received: from geert by ramsan with local (Exim 4.86_2) (envelope-from ) id 1fT4T5-0006xJ-4f; Wed, 13 Jun 2018 14:01:39 +0200 From: Geert Uytterhoeven To: Chuck Lever , "J . Bruce Fields" , Jeff Layton , Trond Myklebust , Anna Schumaker , "David S . Miller" Cc: linux-nfs@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH] SUNRPC: Move inline xprt_alloc_xid() up to fix compiler warning Date: Wed, 13 Jun 2018 14:01:38 +0200 Message-Id: <1528891298-26694-1-git-send-email-geert@linux-m68k.org> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 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 With gcc 4.1.2: net/sunrpc/xprt.c:69: warning: ‘xprt_alloc_xid’ declared inline after being called net/sunrpc/xprt.c:69: warning: previous declaration of ‘xprt_alloc_xid’ was here To fix this, move the function up, before its caller, and remove the no longer needed forward declaration. Fixes: 37ac86c3a76c1136 ("SUNRPC: Initialize rpc_rqst outside of xprt->reserve_lock") Signed-off-by: Geert Uytterhoeven --- net/sunrpc/xprt.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c index 3c85af058227d14b..60a8b9f91cf94b54 100644 --- a/net/sunrpc/xprt.c +++ b/net/sunrpc/xprt.c @@ -66,7 +66,6 @@ * Local functions */ static void xprt_init(struct rpc_xprt *xprt, struct net *net); -static __be32 xprt_alloc_xid(struct rpc_xprt *xprt); static void xprt_connect_status(struct rpc_task *task); static int __xprt_get_cong(struct rpc_xprt *, struct rpc_task *); static void __xprt_put_cong(struct rpc_xprt *, struct rpc_rqst *); @@ -956,6 +955,11 @@ static void xprt_timer(struct rpc_task *task) task->tk_status = 0; } +static inline __be32 xprt_alloc_xid(struct rpc_xprt *xprt) +{ + return (__force __be32)xprt->xid++; +} + /** * xprt_prepare_transmit - reserve the transport before sending a request * @task: RPC task about to send a request @@ -1296,11 +1300,6 @@ void xprt_retry_reserve(struct rpc_task *task) xprt->ops->alloc_slot(xprt, task); } -static inline __be32 xprt_alloc_xid(struct rpc_xprt *xprt) -{ - return (__force __be32)xprt->xid++; -} - static inline void xprt_init_xid(struct rpc_xprt *xprt) { xprt->xid = prandom_u32();