Thread (4 messages) flat view 4 messages, 3 authors, 2012-06-27

RE: [net-next patch] bnx2x: Define bnx2x_tests_str_arr as const

From: Merav Sicron <hidden>
Date: 2012-06-27 12:46:12

On Wed, 2012-06-27 at 12:59 +0100, David Laight wrote:
quoted
-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
Thanks David, let me think about it.
Dave, please ignore this patch for now.
Thanks,
Merav
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help