[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AE90C24D6B3A694183C094C60CF0A2F6026B6F68@saturn3.aculab.com>
Date: Wed, 27 Jun 2012 12:59:22 +0100
From: "David Laight" <David.Laight@...LAB.COM>
To: "Merav Sicron" <meravs@...adcom.com>, <davem@...emloft.net>,
<netdev@...r.kernel.org>, <eilong@...adcom.com>
Subject: RE: [net-next patch] bnx2x: Define bnx2x_tests_str_arr as const
> -static char *bnx2x_tests_str_arr[BNX2X_NUM_TESTS_SF] = {
> +static const char *bnx2x_tests_str_arr[BNX2X_NUM_TESTS_SF] = {
> "register_test (offline) ",
> "memory_test (offline) ",
> "int_loopback_test (offline)",
You are still missing a 'const'.
You probably want:
static const char *const bnx2x_tests_str_arr[] ...
However if you are going to pad the strings to [28]
you might as well remove the layer of indirection - ie:
static const char bnx2x_tests_str_arr[BNX2X_NUM_TESTS_SF][28] = { ...
}
Or pad to 32 chars to (probably) remove some code bytes.
David
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists