i40e: Make struct i40e_stats const
diff mbox

Message ID e5f6bf3aee230a9bcbca499a4288490afb6e4512.1474946199.git.joe@perches.com
State Accepted
Delegated to: Jeff Kirsher
Headers show

Commit Message

Joe Perches Sept. 27, 2016, 3:17 a.m. UTC
Move some data to text

$ size drivers/net/ethernet/intel/i40e/i40e_ethtool.o*
   text	   data	    bss	    dec	    hex	filename
  25012	      0	     32	  25044	   61d4	drivers/net/ethernet/intel/i40e/i40e_ethtool.o.new
  22868	   2120	     32	  25020	   61bc	drivers/net/ethernet/intel/i40e/i40e_ethtool.o.old

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bowers, AndrewX Sept. 28, 2016, 6:42 p.m. UTC | #1
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces@lists.osuosl.org] On
> Behalf Of Joe Perches
> Sent: Monday, September 26, 2016 8:17 PM
> To: Kirsher, Jeffrey T <jeffrey.t.kirsher@intel.com>
> Cc: netdev@vger.kernel.org; intel-wired-lan@lists.osuosl.org; linux-
> kernel@vger.kernel.org
> Subject: [Intel-wired-lan] [PATCH] i40e: Make struct i40e_stats const
> 
> Move some data to text
> 
> $ size drivers/net/ethernet/intel/i40e/i40e_ethtool.o*
>    text	   data	    bss	    dec	    hex	filename
>   25012	      0	     32	  25044	   61d4
> 	drivers/net/ethernet/intel/i40e/i40e_ethtool.o.new
>   22868	   2120	     32	  25020	   61bc
> 	drivers/net/ethernet/intel/i40e/i40e_ethtool.o.old
> 
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Ethtool stats work as expected

Patch
diff mbox

diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index 1835186b62c9..d8847a19dc6b 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -104,7 +104,7 @@  static const struct i40e_stats i40e_gstrings_misc_stats[] = {
  * The PF_STATs are appended to the netdev stats only when ethtool -S
  * is queried on the base PF netdev, not on the VMDq or FCoE netdev.
  */
-static struct i40e_stats i40e_gstrings_stats[] = {
+static const struct i40e_stats i40e_gstrings_stats[] = {
 	I40E_PF_STAT("rx_bytes", stats.eth.rx_bytes),
 	I40E_PF_STAT("tx_bytes", stats.eth.tx_bytes),
 	I40E_PF_STAT("rx_unicast", stats.eth.rx_unicast),