All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Hernán Gonzalez" <hernan@vanguardiasur.com.ar>
To: Ariel.Elior@cavium.com, everest-linux-l2@cavium.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	hernan@vanguardiasur.com.ar
Subject: [PATCH] qlogic/qed: Constify *pkt_type_str[]
Date: Tue, 27 Feb 2018 19:31:34 -0300	[thread overview]
Message-ID: <1519770694-20678-1-git-send-email-hernan@vanguardiasur.com.ar> (raw)

Note: This is compile only tested as I have no access to the hw.
Constifying and declaring as static saves 24 bytes.

add/remove: 0/1 grow/shrink: 0/0 up/down: 0/-24 (-24)
Function                                     old     new   delta
pkt_type_str                                  24       -     -24
Total: Before=3599256, After=3599232, chg -0.00%

Signed-off-by: Hernán Gonzalez <hernan@vanguardiasur.com.ar>
---
 drivers/net/ethernet/qlogic/qed/qed_iwarp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/qlogic/qed/qed_iwarp.c b/drivers/net/ethernet/qlogic/qed/qed_iwarp.c
index ca4a81d..03ad4ee 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_iwarp.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_iwarp.c
@@ -1784,7 +1784,7 @@ enum qed_iwarp_mpa_pkt_type {
 /* fpdu can be fragmented over maximum 3 bds: header, partial mpa, unaligned */
 #define QED_IWARP_MAX_BDS_PER_FPDU 3
 
-char *pkt_type_str[] = {
+static const char * const pkt_type_str[] = {
 	"QED_IWARP_MPA_PKT_PACKED",
 	"QED_IWARP_MPA_PKT_PARTIAL",
 	"QED_IWARP_MPA_PKT_UNALIGNED"
-- 
2.7.4

             reply	other threads:[~2018-02-27 22:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-27 22:31 Hernán Gonzalez [this message]
2018-02-28  8:21 ` [PATCH] qlogic/qed: Constify *pkt_type_str[] Kalderon, Michal
2018-02-28 16:40 ` David Miller

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=1519770694-20678-1-git-send-email-hernan@vanguardiasur.com.ar \
    --to=hernan@vanguardiasur.com.ar \
    --cc=Ariel.Elior@cavium.com \
    --cc=everest-linux-l2@cavium.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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.