Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1778231imm; Fri, 7 Sep 2018 06:07:00 -0700 (PDT) X-Google-Smtp-Source: ANB0VdasDajewtatvch7aLEsZti5x5i6lVjFklUkS+AdXNkO9wY8lSxgu+J9g7W4r1q3UkLg06kK X-Received: by 2002:a63:560e:: with SMTP id k14-v6mr8301351pgb.189.1536325620558; Fri, 07 Sep 2018 06:07:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536325620; cv=none; d=google.com; s=arc-20160816; b=wx3oGwm4ZYRlE5x4+Ptes5s6fT/Z8rsCXJZO2CT8CjvKmTbcJNRMxHEZblzPR/lRmx Dr8Sr0C8pe/t8JqA8oWw8Pib66vjD0VjGKT0WwixYNzT2nOoq86zg9fs9eXxhcyPrEBb gKetxOovDZyAOKEy1TWnSnI96m/zS36GSK9SaG+LFWGSP3ufSCaXnx1k/eYvNBVZpQzk 8I4lot/4XEQHpyiX+w5RUaAxYtKV+O5tsLqOjADke8Eo8l/cqTx7bMa1Rp107bxMbskL VQU16H5bFaPeu2sx4NW9MoR+sLz0m8rlEzZCRP9k/jfHlyKTwStYXMTSmONq+HwQOOUH GbZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=6CL5SRFDU0Y+bPaM+wuCnbURPYv+yy2MmP7JWcKN5s0=; b=xOt6fR+8v0+M/6uvJcu2eaRpt3CAooDszRr2GusZ1sAKRVeb++PUuOPbu6tfvvAkDJ k/fjIRhQoJlcVdR+esAM2rO8mCsjNVUdgbo+lzUf/3SwHEZW0H+EMBEBi5fZQ5U4AFj+ xLCnsFMWNCRYgkF0feN7k3+PpEp8QNxdxh3JFtf+YQUbN6Cj/aL7EfZ35BqUN+OXcqPr u/75OT/nf6UuP7habOLGn5rt7Ue4eWJUY3+YI70CQBwRsWpXqtSOsBkNVh5vb/oZNVtx QO5QBk9z1ee6nDqARc561/0Ga2EAZLHPpBcWXiV1eNqPMChvhdE7RnEG8gK8rbR4+TMr N4Cg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s3-v6si8637336plb.270.2018.09.07.06.06.44; Fri, 07 Sep 2018 06:07:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728430AbeIGRVa convert rfc822-to-8bit (ORCPT + 99 others); Fri, 7 Sep 2018 13:21:30 -0400 Received: from mx01.hxt-semitech.com ([223.203.96.7]:48060 "EHLO barracuda.hxt-semitech.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727104AbeIGRV3 (ORCPT ); Fri, 7 Sep 2018 13:21:29 -0400 X-ASG-Debug-ID: 1536324037-093b7e54e60cbe0001-xx1T2L Received: from HXTBJIDCEMVIW02.hxtcorp.net ([10.128.0.15]) by barracuda.hxt-semitech.com with ESMTP id Gud91UfrNkf9h9qh (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NO); Fri, 07 Sep 2018 20:40:38 +0800 (CST) X-Barracuda-Envelope-From: dongsheng.wang@hxt-semitech.com Received: from HXTBJIDCEMVIW02.hxtcorp.net (10.128.0.15) by HXTBJIDCEMVIW02.hxtcorp.net (10.128.0.15) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 7 Sep 2018 20:40:41 +0800 Received: from HXTBJIDCEMVIW02.hxtcorp.net ([fe80::3e:f4ff:7927:a6f6]) by HXTBJIDCEMVIW02.hxtcorp.net ([fe80::3e:f4ff:7927:a6f6%12]) with mapi id 15.00.1395.000; Fri, 7 Sep 2018 20:40:41 +0800 From: "Wang, Dongsheng" To: "jeffrey.t.kirsher@intel.com" , "sergei.shtylyov@cogentembedded.com" CC: "jacob.e.keller@intel.com" , "davem@davemloft.net" , "intel-wired-lan@lists.osuosl.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "carolyn.wyborny@intel.com" Subject: Re: [PATCH v3 1/2] net: ethernet: i40e: fix build error Thread-Topic: [PATCH v3 1/2] net: ethernet: i40e: fix build error X-ASG-Orig-Subj: Re: [PATCH v3 1/2] net: ethernet: i40e: fix build error Thread-Index: AQHURpyuIJpR//FVHkih3FMT4XCKSQ== Date: Fri, 7 Sep 2018 12:40:40 +0000 Message-ID: References: <1536319175-3660-1-git-send-email-dongsheng.wang@hxt-semitech.com> <1536319175-3660-2-git-send-email-dongsheng.wang@hxt-semitech.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [192.168.50.12] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Barracuda-Connect: UNKNOWN[10.128.0.15] X-Barracuda-Start-Time: 1536324038 X-Barracuda-Encrypted: ECDHE-RSA-AES256-SHA384 X-Barracuda-URL: https://192.168.50.101:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at hxt-semitech.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Bayes: INNOCENT GLOBAL 0.2546 1.0000 -0.5535 X-Barracuda-Spam-Score: -0.05 X-Barracuda-Spam-Status: No, SCORE=-0.05 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests=BSF_RULE7568M X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.57064 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.50 BSF_RULE7568M Custom Rule 7568M Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello all, The i40e_ethtool_stats.h is just included by i40e/i40e_ethtool.c. So the static doesn't make any affect. And Carolyn's team is working rebuild i40e and i40evf. Cheers, Dongsheng On 9/7/2018 7:19 PM, Wang, Dongsheng wrote: > Remove "inline" from __i40e_add_stat_strings and move the function. > > In file included from > drivers/net/ethernet/intel/i40e/i40e_ethtool.c:9:0: > drivers/net/ethernet/intel/i40e/i40e_ethtool.c: In function > __i40e_add_stat_string: > drivers/net/ethernet/intel/i40e/i40e_ethtool_stats.h:193:20: error: > function __i40e_add_stat_strings can never be inlined because it uses > variable argument lists > static inline void __i40e_add_stat_strings(u8 **p, const struct > i40e_stats stats[], > > Tested on: x86_64, make ARCH=i386 > > Modules section .text: > i40e: 00019380 <__i40e_add_stat_strings>: > i40evf: 00006b00 <__i40e_add_stat_strings>: > > Buildin section .text: > i40e: c351ca60 <__i40e_add_stat_strings>: > i40evf: c354f2c0 <__i40e_add_stat_strings>: > > Signed-off-by: Wang Dongsheng > --- > V3: add static > V2: Move function > --- > .../net/ethernet/intel/i40e/i40e_ethtool.c | 24 ++++++++++++++++++ > .../ethernet/intel/i40e/i40e_ethtool_stats.h | 25 ++----------------- > 2 files changed, 26 insertions(+), 23 deletions(-) > > diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c > index d7d3974beca2..34121a72f2e7 100644 > --- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c > +++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c > @@ -1821,6 +1821,30 @@ static void i40e_get_ethtool_stats(struct net_device *netdev, > "ethtool stats count mismatch!"); > } > > +/** > + * __i40e_add_stat_strings - copy stat strings into ethtool buffer > + * @p: ethtool supplied buffer > + * @stats: stat definitions array > + * @size: size of the stats array > + * > + * Format and copy the strings described by stats into the buffer pointed at > + * by p. > + **/ > +static void __i40e_add_stat_strings(u8 **p, const struct i40e_stats stats[], > + const unsigned int size, ...) > +{ > + unsigned int i; > + > + for (i = 0; i < size; i++) { > + va_list args; > + > + va_start(args, size); > + vsnprintf(*p, ETH_GSTRING_LEN, stats[i].stat_string, args); > + *p += ETH_GSTRING_LEN; > + va_end(args); > + } > +} > + > /** > * i40e_get_stat_strings - copy stat strings into supplied buffer > * @netdev: the netdev to collect strings for > diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool_stats.h b/drivers/net/ethernet/intel/i40e/i40e_ethtool_stats.h > index bba1cb0b658f..553b0d720839 100644 > --- a/drivers/net/ethernet/intel/i40e/i40e_ethtool_stats.h > +++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool_stats.h > @@ -181,29 +181,8 @@ i40e_add_queue_stats(u64 **data, struct i40e_ring *ring) > *data += size; > } > > -/** > - * __i40e_add_stat_strings - copy stat strings into ethtool buffer > - * @p: ethtool supplied buffer > - * @stats: stat definitions array > - * @size: size of the stats array > - * > - * Format and copy the strings described by stats into the buffer pointed at > - * by p. > - **/ > -static inline void __i40e_add_stat_strings(u8 **p, const struct i40e_stats stats[], > - const unsigned int size, ...) > -{ > - unsigned int i; > - > - for (i = 0; i < size; i++) { > - va_list args; > - > - va_start(args, size); > - vsnprintf(*p, ETH_GSTRING_LEN, stats[i].stat_string, args); > - *p += ETH_GSTRING_LEN; > - va_end(args); > - } > -} > +static void __i40e_add_stat_strings(u8 **p, const struct i40e_stats stats[], > + const unsigned int size, ...); > > /** > * 40e_add_stat_strings - copy stat strings into ethtool buffer