From patchwork Sat Dec 11 01:40:02 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jon Mason X-Patchwork-Id: 75160 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 9CFDAB70A5 for ; Sat, 11 Dec 2010 12:40:26 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754111Ab0LKBkS (ORCPT ); Fri, 10 Dec 2010 20:40:18 -0500 Received: from mail-gy0-f174.google.com ([209.85.160.174]:51829 "EHLO mail-gy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753200Ab0LKBkR (ORCPT ); Fri, 10 Dec 2010 20:40:17 -0500 Received: by gyb11 with SMTP id 11so2143889gyb.19 for ; Fri, 10 Dec 2010 17:40:16 -0800 (PST) Received: by 10.100.107.13 with SMTP id f13mr930759anc.159.1292031616414; Fri, 10 Dec 2010 17:40:16 -0800 (PST) Received: from arkham.kudzu.us (cpe-72-177-2-76.austin.res.rr.com [72.177.2.76]) by mx.google.com with ESMTPS id 2sm3981642anw.38.2010.12.10.17.40.12 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 10 Dec 2010 17:40:15 -0800 (PST) Received: by arkham.kudzu.us (sSMTP sendmail emulation); Fri, 10 Dec 2010 19:40:10 -0600 From: Jon Mason To: "David S. Miller" Cc: netdev@vger.kernel.org, Sivakumar Subramani , Sreenivasa Honnur , Ram Vepa , Stephen Hemminger Subject: [PATCH 2/4] s2io: make strings at tables const Date: Fri, 10 Dec 2010 19:40:02 -0600 Message-Id: <1292031604-16628-2-git-send-email-jon.mason@exar.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1292031604-16628-1-git-send-email-jon.mason@exar.com> References: <1292031604-16628-1-git-send-email-jon.mason@exar.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Put immutable data in read/only section. Signed-off-by: Stephen Hemminger Signed-off-by: Jon Mason --- drivers/net/s2io.c | 8 ++++---- drivers/net/s2io.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index a6d3eaf..6a87b8c 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c @@ -91,11 +91,11 @@ #define DRV_VERSION "2.0.26.27" /* S2io Driver name & version. */ -static char s2io_driver_name[] = "Neterion"; -static char s2io_driver_version[] = DRV_VERSION; +static const char s2io_driver_name[] = "Neterion"; +static const char s2io_driver_version[] = DRV_VERSION; -static int rxd_size[2] = {32, 48}; -static int rxd_count[2] = {127, 85}; +static const int rxd_size[2] = {32, 48}; +static const int rxd_count[2] = {127, 85}; static inline int RXD_IS_UP2DT(struct RxD_t *rxdp) { diff --git a/drivers/net/s2io.h b/drivers/net/s2io.h index 1671443..7d16030 100644 --- a/drivers/net/s2io.h +++ b/drivers/net/s2io.h @@ -360,7 +360,7 @@ struct stat_block { #define MAX_TX_DESC (MAX_AVAILABLE_TXDS) /* FIFO mappings for all possible number of fifos configured */ -static int fifo_map[][MAX_TX_FIFOS] = { +static const int fifo_map[][MAX_TX_FIFOS] = { {0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 1}, {0, 0, 0, 1, 1, 1, 2, 2}, @@ -371,7 +371,7 @@ static int fifo_map[][MAX_TX_FIFOS] = { {0, 1, 2, 3, 4, 5, 6, 7}, }; -static u16 fifo_selector[MAX_TX_FIFOS] = {0, 1, 3, 3, 7, 7, 7, 7}; +static const u16 fifo_selector[MAX_TX_FIFOS] = {0, 1, 3, 3, 7, 7, 7, 7}; /* Maintains Per FIFO related information. */ struct tx_fifo_config {