Message ID | 1340797976-13827-1-git-send-email-meravs@broadcom.com |
---|---|
State | Changes Requested, archived |
Delegated to: | David Miller |
Headers | show |
> -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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, 2012-06-27 at 12:59 +0100, David Laight wrote: > > -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 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: "Merav Sicron" <meravs@broadcom.com> Date: Wed, 27 Jun 2012 15:45:10 +0300 > Dave, please ignore this patch for now. Ok. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c index bff3129..81cadb6 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c @@ -1600,7 +1600,7 @@ static int bnx2x_set_pauseparam(struct net_device *dev, return 0; } -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)",