All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Colin Ian King <colin.king@canonical.com>,
	netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
	Andrew Bowers <andrewx.bowers@intel.com>,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 13/14] net/ixgbevf: make array api static const, makes object smaller
Date: Tue, 10 Sep 2019 09:34:33 -0700	[thread overview]
Message-ID: <20190910163434.2449-14-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <20190910163434.2449-1-jeffrey.t.kirsher@intel.com>

From: Colin Ian King <colin.king@canonical.com>

Don't populate the array API on the stack but instead make it
static const. Makes the object code smaller by 58 bytes.

Before:
   text	   data	    bss	    dec	    hex	filename
  82969	   9763	    256	  92988	  16b3c	ixgbevf/ixgbevf_main.o

After:
   text	   data	    bss	    dec	    hex	filename
  82815	   9859	    256	  92930	  16b02	ixgbevf/ixgbevf_main.o

(gcc version 9.2.1, amd64)

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index 75e849a64db7..75e93ce2ed99 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -2261,12 +2261,14 @@ static void ixgbevf_init_last_counter_stats(struct ixgbevf_adapter *adapter)
 static void ixgbevf_negotiate_api(struct ixgbevf_adapter *adapter)
 {
 	struct ixgbe_hw *hw = &adapter->hw;
-	int api[] = { ixgbe_mbox_api_14,
-		      ixgbe_mbox_api_13,
-		      ixgbe_mbox_api_12,
-		      ixgbe_mbox_api_11,
-		      ixgbe_mbox_api_10,
-		      ixgbe_mbox_api_unknown };
+	static const int api[] = {
+		ixgbe_mbox_api_14,
+		ixgbe_mbox_api_13,
+		ixgbe_mbox_api_12,
+		ixgbe_mbox_api_11,
+		ixgbe_mbox_api_10,
+		ixgbe_mbox_api_unknown
+	};
 	int err, idx = 0;
 
 	spin_lock_bh(&adapter->mbx_lock);
-- 
2.21.0


  parent reply	other threads:[~2019-09-10 16:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-10 16:34 [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2019-09-10 Jeff Kirsher
2019-09-10 16:34 ` [net-next 01/14] ixgbe: fix memory leaks Jeff Kirsher
2019-09-10 16:34 ` [net-next 02/14] i40e: check __I40E_VF_DISABLE bit in i40e_sync_filters_subtask Jeff Kirsher
2019-09-10 16:34 ` [net-next 03/14] ixgbe: use skb_get_queue_mapping in tx path Jeff Kirsher
2019-09-10 16:34 ` [net-next 04/14] i40e: use ktime_get_real_ts64 instead of ktime_to_timespec64 Jeff Kirsher
2019-09-10 16:34 ` [net-next 05/14] i40e: remove I40E_AQC_ADD_CLOUD_FILTER_OIP Jeff Kirsher
2019-09-10 16:34 ` [net-next 06/14] i40e: mark additional missing bits as reserved Jeff Kirsher
2019-09-10 16:34 ` [net-next 07/14] i40e: fix missed "Negotiated" string in i40e_print_link_message() Jeff Kirsher
2019-09-10 16:34 ` [net-next 08/14] i40e: Fix message for other card without FEC Jeff Kirsher
2019-09-10 16:34 ` [net-next 09/14] i40e: use BIT macro to specify the cloud filter field flags Jeff Kirsher
2019-09-10 16:34 ` [net-next 10/14] i40e: clear __I40E_VIRTCHNL_OP_PENDING on invalid min Tx rate Jeff Kirsher
2019-09-10 16:34 ` [net-next 11/14] ixgbe: Prevent u8 wrapping of ITR value to something less than 10us Jeff Kirsher
2019-09-10 22:19   ` Alexander Duyck
2019-09-11  8:24   ` David Miller
2019-09-10 16:34 ` [net-next 12/14] iavf: fix MAC address setting for VFs when filter is rejected Jeff Kirsher
2019-09-10 16:34 ` Jeff Kirsher [this message]
2019-09-10 16:34 ` [net-next 14/14] i40e: fix potential RX buffer starvation for AF_XDP Jeff Kirsher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190910163434.2449-14-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=andrewx.bowers@intel.com \
    --cc=colin.king@canonical.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@redhat.com \
    --cc=sassmann@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.