* [PATCH] net: ethernet: i40e: fix build error
@ 2018-09-04 9:48 Wang Dongsheng
2018-09-04 10:54 ` Sergei Shtylyov
0 siblings, 1 reply; 3+ messages in thread
From: Wang Dongsheng @ 2018-09-04 9:48 UTC (permalink / raw)
To: jeffrey.t.kirsher
Cc: jacob.e.keller, davem, intel-wired-lan, netdev, linux-kernel,
Wang Dongsheng
Remove "inline" from __i40e_add_stat_strings.
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_strings’:
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[],
Signed-off-by: Wang Dongsheng <dongsheng.wang@hxt-semitech.com>
---
drivers/net/ethernet/intel/i40e/i40e_ethtool_stats.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool_stats.h b/drivers/net/ethernet/intel/i40e/i40e_ethtool_stats.h
index bba1cb0..0290ade 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool_stats.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool_stats.h
@@ -190,7 +190,7 @@ struct i40e_stats {
* 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[],
+static void __i40e_add_stat_strings(u8 **p, const struct i40e_stats stats[],
const unsigned int size, ...)
{
unsigned int i;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] net: ethernet: i40e: fix build error
2018-09-04 9:48 [PATCH] net: ethernet: i40e: fix build error Wang Dongsheng
@ 2018-09-04 10:54 ` Sergei Shtylyov
2018-09-05 1:32 ` Wang, Dongsheng
0 siblings, 1 reply; 3+ messages in thread
From: Sergei Shtylyov @ 2018-09-04 10:54 UTC (permalink / raw)
To: Wang Dongsheng, jeffrey.t.kirsher
Cc: jacob.e.keller, davem, intel-wired-lan, netdev, linux-kernel
On 9/4/2018 12:48 PM, Wang Dongsheng wrote:
> Remove "inline" from __i40e_add_stat_strings.
>
> 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_strings’:
> 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[],
>
> Signed-off-by: Wang Dongsheng <dongsheng.wang@hxt-semitech.com>
> ---
> drivers/net/ethernet/intel/i40e/i40e_ethtool_stats.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool_stats.h b/drivers/net/ethernet/intel/i40e/i40e_ethtool_stats.h
> index bba1cb0..0290ade 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_ethtool_stats.h
> +++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool_stats.h
> @@ -190,7 +190,7 @@ struct i40e_stats {
> * 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[],
> +static void __i40e_add_stat_strings(u8 **p, const struct i40e_stats stats[],
You can't have non-inline function in a header file. Please move it,
leaving only prototype here.
> const unsigned int size, ...)
> {
> unsigned int i;
MBR, Sergei
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net: ethernet: i40e: fix build error
2018-09-04 10:54 ` Sergei Shtylyov
@ 2018-09-05 1:32 ` Wang, Dongsheng
0 siblings, 0 replies; 3+ messages in thread
From: Wang, Dongsheng @ 2018-09-05 1:32 UTC (permalink / raw)
To: Sergei Shtylyov, jeffrey.t.kirsher
Cc: jacob.e.keller, davem, intel-wired-lan, netdev, linux-kernel
On 2018/9/4 18:54, Sergei Shtylyov wrote:
> On 9/4/2018 12:48 PM, Wang Dongsheng wrote:
>
>> Remove "inline" from __i40e_add_stat_strings.
>>
>> 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_strings’:
>> 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[],
>>
>> Signed-off-by: Wang Dongsheng <dongsheng.wang@hxt-semitech.com>
>> ---
>> drivers/net/ethernet/intel/i40e/i40e_ethtool_stats.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool_stats.h b/drivers/net/ethernet/intel/i40e/i40e_ethtool_stats.h
>> index bba1cb0..0290ade 100644
>> --- a/drivers/net/ethernet/intel/i40e/i40e_ethtool_stats.h
>> +++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool_stats.h
>> @@ -190,7 +190,7 @@ struct i40e_stats {
>> * 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[],
>> +static void __i40e_add_stat_strings(u8 **p, const struct i40e_stats stats[],
> You can't have non-inline function in a header file. Please move it,
> leaving only prototype here.
:(. Oops, a stupid mistake...fix an error and bring in another
error...Thanks.
Cheers,
-Dongsheng
>> const unsigned int size, ...)
>> {
>> unsigned int i;
> MBR, Sergei
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-09-05 1:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-04 9:48 [PATCH] net: ethernet: i40e: fix build error Wang Dongsheng
2018-09-04 10:54 ` Sergei Shtylyov
2018-09-05 1:32 ` Wang, Dongsheng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).