From patchwork Mon Sep 13 19:47:40 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Perches X-Patchwork-Id: 64629 X-Patchwork-Delegate: benh@kernel.crashing.org Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from bilbo.ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 83310100894 for ; Tue, 14 Sep 2010 05:48:33 +1000 (EST) Received: from mail.perches.com (mail.perches.com [173.55.12.10]) by ozlabs.org (Postfix) with ESMTP id 9AB83B70A6 for ; Tue, 14 Sep 2010 05:48:24 +1000 (EST) Received: from Joe-Laptop.home (unknown [192.168.1.162]) by mail.perches.com (Postfix) with ESMTP id 26E212436C; Mon, 13 Sep 2010 12:48:22 -0700 (PDT) From: Joe Perches To: linux-kernel@vger.kernel.org Subject: [PATCH 02/25] arch/powerpc: Use static const char arrays Date: Mon, 13 Sep 2010 12:47:40 -0700 Message-Id: X-Mailer: git-send-email 1.7.3.rc1 In-Reply-To: References: Cc: Paul Mackerras , linuxppc-dev@lists.ozlabs.org X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Signed-off-by: Joe Perches Reviewed-by: Stephen Rothwell --- arch/powerpc/boot/addnote.c | 4 ++-- arch/powerpc/boot/cuboot-c2k.c | 4 ++-- arch/powerpc/kernel/irq.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/boot/addnote.c b/arch/powerpc/boot/addnote.c index b1e5611..349b553 100644 --- a/arch/powerpc/boot/addnote.c +++ b/arch/powerpc/boot/addnote.c @@ -20,7 +20,7 @@ #include /* CHRP note section */ -char arch[] = "PowerPC"; +static const char arch[] = "PowerPC"; #define N_DESCR 6 unsigned int descr[N_DESCR] = { @@ -33,7 +33,7 @@ unsigned int descr[N_DESCR] = { }; /* RPA note section */ -char rpaname[] = "IBM,RPA-Client-Config"; +static const char rpaname[] = "IBM,RPA-Client-Config"; /* * Note: setting ignore_my_client_config *should* mean that OF ignores diff --git a/arch/powerpc/boot/cuboot-c2k.c b/arch/powerpc/boot/cuboot-c2k.c index e435949..030d7db 100644 --- a/arch/powerpc/boot/cuboot-c2k.c +++ b/arch/powerpc/boot/cuboot-c2k.c @@ -62,9 +62,9 @@ static void c2k_bridge_setup(u32 mem_size) /* Get the cpu -> pci i/o & mem mappings from the device tree */ devp = NULL; for (bus = 0; ; bus++) { - char name[] = "pci "; + char name[sizeof("pciX")]; - name[strlen(name)-1] = bus+'0'; + sprintf(name, "pci%c", bus + '0'); devp = find_node_by_alias(name); if (devp == NULL) diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 4a65386..47fbc56 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c @@ -1143,7 +1143,7 @@ static int virq_debug_show(struct seq_file *m, void *private) unsigned long flags; struct irq_desc *desc; const char *p; - char none[] = "none"; + static const char none[] = "none"; int i; seq_printf(m, "%-5s %-7s %-15s %s\n", "virq", "hwirq",