From patchwork Sun Sep 10 22:10:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 9946411 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 66986602C9 for ; Sun, 10 Sep 2017 22:10:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5AB1728A54 for ; Sun, 10 Sep 2017 22:10:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4F9D028A55; Sun, 10 Sep 2017 22:10:52 +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 60C4E28A6E for ; Sun, 10 Sep 2017 22:10:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751722AbdIJWKs (ORCPT ); Sun, 10 Sep 2017 18:10:48 -0400 Received: from mx2.mailbox.org ([80.241.60.215]:45962 "EHLO mx2.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751782AbdIJWKr (ORCPT ); Sun, 10 Sep 2017 18:10:47 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id 7B56347872; Mon, 11 Sep 2017 00:10:46 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by gerste.heinlein-support.de (gerste.heinlein-support.de [91.198.250.173]) (amavisd-new, port 10030) with ESMTP id 5UqhAUT_QDUW; Mon, 11 Sep 2017 00:10:43 +0200 (CEST) From: Hauke Mehrtens To: johannes@sipsolutions.net Cc: backports@vger.kernel.org, Hauke Mehrtens Subject: [PATCH 1/8] patches: export bp_usbnet_get_stats64() only if function is added Date: Mon, 11 Sep 2017 00:10:13 +0200 Message-Id: <20170910221020.13067-2-hauke@hauke-m.de> In-Reply-To: <20170910221020.13067-1-hauke@hauke-m.de> References: <20170910221020.13067-1-hauke@hauke-m.de> Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Export the bp_usbnet_get_stats64() function only on kernel < 4.11, because this function is only available on such kernel versions. Fixes: 5a00d8489c7 ("patches: adapt the stat64 usage for usbnet") Signed-off-by: Hauke Mehrtens --- patches/0075-ndo-stats-64/usbnet.patch | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/patches/0075-ndo-stats-64/usbnet.patch b/patches/0075-ndo-stats-64/usbnet.patch index 09de2784..7b48bfeb 100644 --- a/patches/0075-ndo-stats-64/usbnet.patch +++ b/patches/0075-ndo-stats-64/usbnet.patch @@ -1,20 +1,18 @@ -diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c -index 095bcfd..6305c41 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c -@@ -1014,6 +1014,7 @@ +@@ -1014,6 +1014,9 @@ void usbnet_get_stats64(struct net_devic } } EXPORT_SYMBOL_GPL(usbnet_get_stats64); ++#if LINUX_VERSION_IS_LESS(4,11,0) +EXPORT_SYMBOL_GPL(bp_usbnet_get_stats64); ++#endif u32 usbnet_get_link (struct net_device *net) { -diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h -index 9711637..363f6b9 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h -@@ -283,5 +283,9 @@ extern void usbnet_status_stop(struct usbnet *dev); +@@ -283,5 +283,9 @@ extern void usbnet_status_stop(struct us extern void usbnet_update_max_qlen(struct usbnet *dev); extern void usbnet_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats);