Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756576Ab0KUCkG (ORCPT ); Sat, 20 Nov 2010 21:40:06 -0500 Received: from mail.perches.com ([173.55.12.10]:1638 "EHLO mail.perches.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756139Ab0KUCjs (ORCPT ); Sat, 20 Nov 2010 21:39:48 -0500 From: Joe Perches To: Eilon Greenstein Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 08/62] bnx2x: Use static const Date: Sat, 20 Nov 2010 18:38:09 -0800 Message-Id: X-Mailer: git-send-email 1.7.3.2.245.g03276.dirty In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1715 Lines: 46 Using static const generally increases object text and decreases data size. It also generally decreases overall object size. text data bss dec hex filename 147632 349 34240 182221 2c7cd drivers/net/bnx2x/bnx2x_main.o.old 147588 349 34240 182177 2c7a1 drivers/net/bnx2x/bnx2x_main.o.new Changed bnx2x_set_mac_addr_gen to use const * Signed-off-by: Joe Perches --- drivers/net/bnx2x/bnx2x_main.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/bnx2x/bnx2x_main.c b/drivers/net/bnx2x/bnx2x_main.c index 2a50231..fbcffc6 100644 --- a/drivers/net/bnx2x/bnx2x_main.c +++ b/drivers/net/bnx2x/bnx2x_main.c @@ -6055,7 +6055,7 @@ static int bnx2x_func_stop(struct bnx2x *bp) * @param cam_offset offset in a CAM to use * @param is_bcast is the set MAC a broadcast address (for E1 only) */ -static void bnx2x_set_mac_addr_gen(struct bnx2x *bp, int set, u8 *mac, +static void bnx2x_set_mac_addr_gen(struct bnx2x *bp, int set, const u8 *mac, u32 cl_bit_vec, u8 cam_offset, u8 is_bcast) { @@ -6181,7 +6181,9 @@ void bnx2x_set_eth_mac(struct bnx2x *bp, int set) if (CHIP_IS_E1(bp)) { /* broadcast MAC */ - u8 bcast[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; + static const u8 bcast[ETH_ALEN] = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }; bnx2x_set_mac_addr_gen(bp, set, bcast, 0, cam_offset + 1, 1); } } -- 1.7.3.2.245.g03276.dirty -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/