From patchwork Thu Nov 2 09:59:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Coelho X-Patchwork-Id: 10038267 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 C1D386032D for ; Thu, 2 Nov 2017 09:59:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AF4B42857E for ; Thu, 2 Nov 2017 09:59:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A1B56285F5; Thu, 2 Nov 2017 09:59:47 +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=-6.9 required=2.0 tests=BAYES_00,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 24F1E2857E for ; Thu, 2 Nov 2017 09:59:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755188AbdKBJ7q (ORCPT ); Thu, 2 Nov 2017 05:59:46 -0400 Received: from paleale.coelho.fi ([176.9.41.70]:43550 "EHLO farmhouse.coelho.fi" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755125AbdKBJ7q (ORCPT ); Thu, 2 Nov 2017 05:59:46 -0400 Received: from a91-156-4-241.elisa-laajakaista.fi ([91.156.4.241] helo=redipa.ger.corp.intel.com) by farmhouse.coelho.fi with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1eACHk-00073a-LJ; Thu, 02 Nov 2017 11:59:41 +0200 From: Luca Coelho To: backports@vger.kernel.org Cc: johannes@sipsolutions.net, hauke@hauke-m.de, Luca Coelho Date: Thu, 2 Nov 2017 11:59:35 +0200 Message-Id: <20171102095935.31299-1-luca@coelho.fi> X-Mailer: git-send-email 2.14.2 X-SA-Exim-Connect-IP: 91.156.4.241 X-SA-Exim-Mail-From: luca@coelho.fi Subject: [PATCH] patches: pre-declare stats64_fn_wrap() to avoid sparse warnings X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on farmhouse.coelho.fi) Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Luca Coelho The stats64_fn_wrap() function was changed to be not-static so it can be used by usbnet. This causes problems in files that don't export it. Work around that byt just pre-declaring it before the actual definition. Fixes: 5a00d8489c7 ("patches: adapt the stat64 usage for usbnet") Signed-off-by: Luca Coelho --- patches/0075-ndo-stats-64.cocci | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/patches/0075-ndo-stats-64.cocci b/patches/0075-ndo-stats-64.cocci index 8613182403e2..8971a97c7209 100644 --- a/patches/0075-ndo-stats-64.cocci +++ b/patches/0075-ndo-stats-64.cocci @@ -18,6 +18,10 @@ identifier r.stats64_fn; @@ void stats64_fn(...) {...} +#if LINUX_VERSION_IS_LESS(4,11,0) ++/* Just declare it here to keep sparse happy */ ++struct rtnl_link_stats64 * ++stats64_fn_wrap(struct net_device *dev, ++ struct rtnl_link_stats64 *stats); +struct rtnl_link_stats64 * +stats64_fn_wrap(struct net_device *dev, + struct rtnl_link_stats64 *stats)