OSDN Git Service

i40e(vf): remove i40e_ethtool_stats.h header file
authorJacob Keller <jacob.e.keller@intel.com>
Fri, 7 Sep 2018 21:55:44 +0000 (14:55 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 8 Sep 2018 17:06:17 +0000 (10:06 -0700)
commit6ad96bdca8aae5002819280df2a850c05cb0a592
tree0ca2b94e82f29484d75ddd0017e73631eaabe12a
parent7a8c7f5c30f90cb6f843e473acbd3a4b58c476b6
i40e(vf): remove i40e_ethtool_stats.h header file

Essentially reverts commit 8fd75c58a09a ("i40e: move ethtool
stats boiler plate code to i40e_ethtool_stats.h", 2018-08-30), and
additionally moves the similar code in i40evf into i40evf_ethtool.c.

The code was intially moved from i40e_ethtool.c into i40e_ethtool_stats.h
as a way of better logically organizing the code. This has two problems.
First, we can't have an inline function with variadic arguments on all
platforms. Second, it gave the appearance that we had plans to share
code between the i40e and i40evf drivers, due to having a near copy of
the contents in the i40evf/i40e_ethtool_stats.h file.

Patches which actually attempt to combine or share code between the i40e
and i40evf drivers have not materialized, and are likely a ways off.

Rather than fixing the one function which causes build issues, just move
this code back into the i40e_ethtool.c and i40evf_ethtool.c files. Note
that we also change these functions back from static inlines to just
statics, since they're no longer in a header file.

We can revisit this if/when work is done to actually attempt to share
code between drivers. Alternatively, this stats code could be made more
generic so that it can be shared across drivers as part of ethtool
kernel work.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/intel/i40e/i40e_ethtool.c
drivers/net/ethernet/intel/i40e/i40e_ethtool_stats.h [deleted file]
drivers/net/ethernet/intel/i40evf/i40e_ethtool_stats.h [deleted file]
drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c