All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH next 00/16] treewide: Use static const char * const where possible
@ 2010-09-14  4:23 ` Joe Perches
  0 siblings, 0 replies; 28+ messages in thread
From: Joe Perches @ 2010-09-14  4:23 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-alpha, linux-ia64, microblaze-uclinux, kvm, dri-devel,
	netdev, linux-wireless, users, linux-scsi, devel, linux-usb,
	linux-watchdog, linux-fsdevel, alsa-devel

Convert the uses that should be const of
	char *foo[] = {"bar", "baz"};
to
	const char * const foo[] = {"bar", "baz"};
or
	static const char * const foo[] = {"bar", "baz"};

Joe Perches (16):
  arch/alpha: Use static const char * const where possible
  arch/ia64: Use static const char * const where possible
  arch/microblaze: Use static const char * const where possible
  arch/x86: Use static const char * const where possible
  drivers/gpu: Use static const char * const where possible
  drivers/isdn: Use static const char * const where possible
  drivers/net: Use static const char * const where possible
  drivers/net/pcmcia: Use static const char * const where possible
  drivers/net/wireless: Use static const char * const where possible
  drivers/scsi: Use static const char * const where possible
  drivers/staging: Use static const char * const where possible
  drivers/usb: Use static const char * const where possible
  drivers/watchdog: Use static const char * const where possible
  fs: Use static const char * const where possible
  net/irda: Use static const char * const where possible
  sound: Use static const char * const where possible

 arch/alpha/kernel/err_ev6.c                  |   12 +++++---
 arch/alpha/kernel/err_marvel.c               |   33 ++++++++++++------------
 arch/alpha/kernel/err_titan.c                |   35 ++++++++++++++-----------
 arch/alpha/kernel/osf_sys.c                  |    4 +-
 arch/ia64/kernel/palinfo.c                   |    2 +-
 arch/microblaze/kernel/heartbeat.c           |   10 +++---
 arch/microblaze/kernel/timer.c               |   12 ++++----
 arch/x86/kernel/smpboot.c                    |    2 +-
 arch/x86/kvm/mmu.c                           |    2 +-
 drivers/gpu/drm/ttm/ttm_page_alloc.c         |    4 ++-
 drivers/isdn/pcbit/edss1.c                   |    2 +-
 drivers/isdn/pcbit/edss1.h                   |    2 +-
 drivers/net/3c515.c                          |    4 ++-
 drivers/net/eth16i.c                         |    4 ++-
 drivers/net/pcmcia/3c589_cs.c                |    2 +-
 drivers/net/wireless/rt2x00/rt2x00debug.c    |    2 +-
 drivers/scsi/bfa/rport.c                     |    4 ++-
 drivers/scsi/pcmcia/nsp_debug.c              |    2 +-
 drivers/scsi/qla2xxx/qla_nx.c                |    4 +-
 drivers/scsi/qla4xxx/ql4_nx.c                |    2 +-
 drivers/staging/ath6kl/os/linux/ar6000_drv.c |   14 +++++-----
 drivers/staging/bcm/Debug.c                  |    5 ++-
 drivers/usb/host/oxu210hp-hcd.c              |    2 +-
 drivers/watchdog/machzwd.c                   |    2 +-
 fs/binfmt_flat.c                             |    4 ++-
 include/net/irda/irlan_event.h               |    2 +-
 net/irda/irlan/irlan_event.c                 |    2 +-
 sound/core/misc.c                            |    5 +---
 sound/core/pcm_native.c                      |    2 +-
 29 files changed, 99 insertions(+), 83 deletions(-)

-- 
1.7.3.rc1


^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH next 00/16] treewide: Use static const char * const where possible
@ 2010-09-14  4:23 ` Joe Perches
  0 siblings, 0 replies; 28+ messages in thread
From: Joe Perches @ 2010-09-14  4:23 UTC (permalink / raw)
  To: linux-kernel
  Cc: devel, alsa-devel, linux-usb, linux-ia64, linux-scsi, kvm,
	microblaze-uclinux, linux-alpha, linux-wireless, users,
	dri-devel, netdev, linux-fsdevel, linux-watchdog

Convert the uses that should be const of
	char *foo[] = {"bar", "baz"};
to
	const char * const foo[] = {"bar", "baz"};
or
	static const char * const foo[] = {"bar", "baz"};

Joe Perches (16):
  arch/alpha: Use static const char * const where possible
  arch/ia64: Use static const char * const where possible
  arch/microblaze: Use static const char * const where possible
  arch/x86: Use static const char * const where possible
  drivers/gpu: Use static const char * const where possible
  drivers/isdn: Use static const char * const where possible
  drivers/net: Use static const char * const where possible
  drivers/net/pcmcia: Use static const char * const where possible
  drivers/net/wireless: Use static const char * const where possible
  drivers/scsi: Use static const char * const where possible
  drivers/staging: Use static const char * const where possible
  drivers/usb: Use static const char * const where possible
  drivers/watchdog: Use static const char * const where possible
  fs: Use static const char * const where possible
  net/irda: Use static const char * const where possible
  sound: Use static const char * const where possible

 arch/alpha/kernel/err_ev6.c                  |   12 +++++---
 arch/alpha/kernel/err_marvel.c               |   33 ++++++++++++------------
 arch/alpha/kernel/err_titan.c                |   35 ++++++++++++++-----------
 arch/alpha/kernel/osf_sys.c                  |    4 +-
 arch/ia64/kernel/palinfo.c                   |    2 +-
 arch/microblaze/kernel/heartbeat.c           |   10 +++---
 arch/microblaze/kernel/timer.c               |   12 ++++----
 arch/x86/kernel/smpboot.c                    |    2 +-
 arch/x86/kvm/mmu.c                           |    2 +-
 drivers/gpu/drm/ttm/ttm_page_alloc.c         |    4 ++-
 drivers/isdn/pcbit/edss1.c                   |    2 +-
 drivers/isdn/pcbit/edss1.h                   |    2 +-
 drivers/net/3c515.c                          |    4 ++-
 drivers/net/eth16i.c                         |    4 ++-
 drivers/net/pcmcia/3c589_cs.c                |    2 +-
 drivers/net/wireless/rt2x00/rt2x00debug.c    |    2 +-
 drivers/scsi/bfa/rport.c                     |    4 ++-
 drivers/scsi/pcmcia/nsp_debug.c              |    2 +-
 drivers/scsi/qla2xxx/qla_nx.c                |    4 +-
 drivers/scsi/qla4xxx/ql4_nx.c                |    2 +-
 drivers/staging/ath6kl/os/linux/ar6000_drv.c |   14 +++++-----
 drivers/staging/bcm/Debug.c                  |    5 ++-
 drivers/usb/host/oxu210hp-hcd.c              |    2 +-
 drivers/watchdog/machzwd.c                   |    2 +-
 fs/binfmt_flat.c                             |    4 ++-
 include/net/irda/irlan_event.h               |    2 +-
 net/irda/irlan/irlan_event.c                 |    2 +-
 sound/core/misc.c                            |    5 +---
 sound/core/pcm_native.c                      |    2 +-
 29 files changed, 99 insertions(+), 83 deletions(-)

-- 
1.7.3.rc1

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH next 00/16] treewide: Use static const char * const where possible
@ 2010-09-14  4:23 ` Joe Perches
  0 siblings, 0 replies; 28+ messages in thread
From: Joe Perches @ 2010-09-14  4:23 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-alpha, linux-ia64, microblaze-uclinux, kvm, dri-devel,
	netdev, linux-wireless, users, linux-scsi, devel, linux-usb,
	linux-watchdog, linux-fsdevel, alsa-devel

Convert the uses that should be const of
	char *foo[] = {"bar", "baz"};
to
	const char * const foo[] = {"bar", "baz"};
or
	static const char * const foo[] = {"bar", "baz"};

Joe Perches (16):
  arch/alpha: Use static const char * const where possible
  arch/ia64: Use static const char * const where possible
  arch/microblaze: Use static const char * const where possible
  arch/x86: Use static const char * const where possible
  drivers/gpu: Use static const char * const where possible
  drivers/isdn: Use static const char * const where possible
  drivers/net: Use static const char * const where possible
  drivers/net/pcmcia: Use static const char * const where possible
  drivers/net/wireless: Use static const char * const where possible
  drivers/scsi: Use static const char * const where possible
  drivers/staging: Use static const char * const where possible
  drivers/usb: Use static const char * const where possible
  drivers/watchdog: Use static const char * const where possible
  fs: Use static const char * const where possible
  net/irda: Use static const char * const where possible
  sound: Use static const char * const where possible

 arch/alpha/kernel/err_ev6.c                  |   12 +++++---
 arch/alpha/kernel/err_marvel.c               |   33 ++++++++++++------------
 arch/alpha/kernel/err_titan.c                |   35 ++++++++++++++-----------
 arch/alpha/kernel/osf_sys.c                  |    4 +-
 arch/ia64/kernel/palinfo.c                   |    2 +-
 arch/microblaze/kernel/heartbeat.c           |   10 +++---
 arch/microblaze/kernel/timer.c               |   12 ++++----
 arch/x86/kernel/smpboot.c                    |    2 +-
 arch/x86/kvm/mmu.c                           |    2 +-
 drivers/gpu/drm/ttm/ttm_page_alloc.c         |    4 ++-
 drivers/isdn/pcbit/edss1.c                   |    2 +-
 drivers/isdn/pcbit/edss1.h                   |    2 +-
 drivers/net/3c515.c                          |    4 ++-
 drivers/net/eth16i.c                         |    4 ++-
 drivers/net/pcmcia/3c589_cs.c                |    2 +-
 drivers/net/wireless/rt2x00/rt2x00debug.c    |    2 +-
 drivers/scsi/bfa/rport.c                     |    4 ++-
 drivers/scsi/pcmcia/nsp_debug.c              |    2 +-
 drivers/scsi/qla2xxx/qla_nx.c                |    4 +-
 drivers/scsi/qla4xxx/ql4_nx.c                |    2 +-
 drivers/staging/ath6kl/os/linux/ar6000_drv.c |   14 +++++-----
 drivers/staging/bcm/Debug.c                  |    5 ++-
 drivers/usb/host/oxu210hp-hcd.c              |    2 +-
 drivers/watchdog/machzwd.c                   |    2 +-
 fs/binfmt_flat.c                             |    4 ++-
 include/net/irda/irlan_event.h               |    2 +-
 net/irda/irlan/irlan_event.c                 |    2 +-
 sound/core/misc.c                            |    5 +---
 sound/core/pcm_native.c                      |    2 +-
 29 files changed, 99 insertions(+), 83 deletions(-)

-- 
1.7.3.rc1


^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH next 01/16] arch/alpha: Use static const char * const where possible
  2010-09-14  4:23 ` Joe Perches
  (?)
  (?)
@ 2010-09-14  4:23 ` Joe Perches
  2010-09-14 15:37   ` Richard Henderson
  2010-09-14 17:03     ` Matt Turner
  -1 siblings, 2 replies; 28+ messages in thread
From: Joe Perches @ 2010-09-14  4:23 UTC (permalink / raw)
  To: linux-kernel; +Cc: Richard Henderson, Ivan Kokshaysky, Matt Turner, linux-alpha

Signed-off-by: Joe Perches <joe@perches.com>
---
 arch/alpha/kernel/err_ev6.c    |   12 +++++++-----
 arch/alpha/kernel/err_marvel.c |   33 +++++++++++++++++----------------
 arch/alpha/kernel/err_titan.c  |   35 ++++++++++++++++++++---------------
 arch/alpha/kernel/osf_sys.c    |    4 ++--
 4 files changed, 46 insertions(+), 38 deletions(-)

diff --git a/arch/alpha/kernel/err_ev6.c b/arch/alpha/kernel/err_ev6.c
index 8ca6345..253cf1a 100644
--- a/arch/alpha/kernel/err_ev6.c
+++ b/arch/alpha/kernel/err_ev6.c
@@ -90,11 +90,13 @@ static int
 ev6_parse_cbox(u64 c_addr, u64 c1_syn, u64 c2_syn, 
 	       u64 c_stat, u64 c_sts, int print)
 {
-	char *sourcename[] = { "UNKNOWN", "UNKNOWN", "UNKNOWN",
-			       "MEMORY", "BCACHE", "DCACHE", 
-			       "BCACHE PROBE", "BCACHE PROBE" };
-	char *streamname[] = { "D", "I" };
-	char *bitsname[] = { "SINGLE", "DOUBLE" };
+	static const char * const sourcename[] = {
+		"UNKNOWN", "UNKNOWN", "UNKNOWN",
+		"MEMORY", "BCACHE", "DCACHE",
+		"BCACHE PROBE", "BCACHE PROBE"
+	};
+	static const char * const streamname[] = { "D", "I" };
+	static const char * const bitsname[] = { "SINGLE", "DOUBLE" };
 	int status = MCHK_DISPOSITION_REPORT;
 	int source = -1, stream = -1, bits = -1;
 
diff --git a/arch/alpha/kernel/err_marvel.c b/arch/alpha/kernel/err_marvel.c
index 5c905aa..648ae88 100644
--- a/arch/alpha/kernel/err_marvel.c
+++ b/arch/alpha/kernel/err_marvel.c
@@ -589,22 +589,23 @@ marvel_print_pox_spl_cmplt(u64 spl_cmplt)
 static void
 marvel_print_pox_trans_sum(u64 trans_sum)
 {
-	char *pcix_cmd[] = { "Interrupt Acknowledge",
-			     "Special Cycle",
-			     "I/O Read",
-			     "I/O Write",
-			     "Reserved",
-			     "Reserved / Device ID Message",
-			     "Memory Read",
-			     "Memory Write",
-			     "Reserved / Alias to Memory Read Block",
-			     "Reserved / Alias to Memory Write Block",
-			     "Configuration Read",
-			     "Configuration Write",
-			     "Memory Read Multiple / Split Completion",
-			     "Dual Address Cycle",
-			     "Memory Read Line / Memory Read Block",
-			     "Memory Write and Invalidate / Memory Write Block"
+	static const char * const pcix_cmd[] = {
+		"Interrupt Acknowledge",
+		"Special Cycle",
+		"I/O Read",
+		"I/O Write",
+		"Reserved",
+		"Reserved / Device ID Message",
+		"Memory Read",
+		"Memory Write",
+		"Reserved / Alias to Memory Read Block",
+		"Reserved / Alias to Memory Write Block",
+		"Configuration Read",
+		"Configuration Write",
+		"Memory Read Multiple / Split Completion",
+		"Dual Address Cycle",
+		"Memory Read Line / Memory Read Block",
+		"Memory Write and Invalidate / Memory Write Block"
 	};
 
 #define IO7__POX_TRANSUM__PCI_ADDR__S		(0)
diff --git a/arch/alpha/kernel/err_titan.c b/arch/alpha/kernel/err_titan.c
index f7ed97c..c3b3781 100644
--- a/arch/alpha/kernel/err_titan.c
+++ b/arch/alpha/kernel/err_titan.c
@@ -75,8 +75,12 @@ titan_parse_p_serror(int which, u64 serror, int print)
 	int status = MCHK_DISPOSITION_REPORT;
 
 #ifdef CONFIG_VERBOSE_MCHECK
-	char *serror_src[] = {"GPCI", "APCI", "AGP HP", "AGP LP"};
-	char *serror_cmd[] = {"DMA Read", "DMA RMW", "SGTE Read", "Reserved"};
+	static const char * const serror_src[] = {
+		"GPCI", "APCI", "AGP HP", "AGP LP"
+	};
+	static const char * const serror_cmd[] = {
+		"DMA Read", "DMA RMW", "SGTE Read", "Reserved"
+	};
 #endif /* CONFIG_VERBOSE_MCHECK */
 
 #define TITAN__PCHIP_SERROR__LOST_UECC	(1UL << 0)
@@ -140,14 +144,15 @@ titan_parse_p_perror(int which, int port, u64 perror, int print)
 	int status = MCHK_DISPOSITION_REPORT;
 
 #ifdef CONFIG_VERBOSE_MCHECK
-	char *perror_cmd[] = { "Interrupt Acknowledge", "Special Cycle",
-			       "I/O Read",	       	"I/O Write",
-			       "Reserved",	       	"Reserved",
-			       "Memory Read",		"Memory Write",
-			       "Reserved",		"Reserved",
-			       "Configuration Read",	"Configuration Write",
-			       "Memory Read Multiple",	"Dual Address Cycle",
-			       "Memory Read Line","Memory Write and Invalidate"
+	static const char * const perror_cmd[] = {
+		"Interrupt Acknowledge", "Special Cycle",
+		"I/O Read",		"I/O Write",
+		"Reserved",		"Reserved",
+		"Memory Read",		"Memory Write",
+		"Reserved",		"Reserved",
+		"Configuration Read",	"Configuration Write",
+		"Memory Read Multiple",	"Dual Address Cycle",
+		"Memory Read Line",	"Memory Write and Invalidate"
 	};
 #endif /* CONFIG_VERBOSE_MCHECK */
 
@@ -273,11 +278,11 @@ titan_parse_p_agperror(int which, u64 agperror, int print)
 	int cmd, len;
 	unsigned long addr;
 
-	char *agperror_cmd[] = { "Read (low-priority)",	"Read (high-priority)",
-				 "Write (low-priority)",
-				 "Write (high-priority)",
-				 "Reserved",		"Reserved",
-				 "Flush",		"Fence"
+	static const char * const agperror_cmd[] = {
+		"Read (low-priority)",	"Read (high-priority)",
+		"Write (low-priority)",	"Write (high-priority)",
+		"Reserved",		"Reserved",
+		"Flush",		"Fence"
 	};
 #endif /* CONFIG_VERBOSE_MCHECK */
 
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c
index 5d1e6d6..16bc1f5 100644
--- a/arch/alpha/kernel/osf_sys.c
+++ b/arch/alpha/kernel/osf_sys.c
@@ -594,7 +594,7 @@ SYSCALL_DEFINE2(osf_sigstack, struct sigstack __user *, uss,
 
 SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
 {
-	char *sysinfo_table[] = {
+	const char *sysinfo_table[] = {
 		utsname()->sysname,
 		utsname()->nodename,
 		utsname()->release,
@@ -606,7 +606,7 @@ SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
 		"dummy",	/* secure RPC domain */
 	};
 	unsigned long offset;
-	char *res;
+	const char *res;
 	long len, err = -EINVAL;
 
 	offset = command-1;
-- 
1.7.3.rc1


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH next 02/16] arch/ia64: Use static const char * const where possible
  2010-09-14  4:23 ` Joe Perches
@ 2010-09-14  4:23   ` Joe Perches
  -1 siblings, 0 replies; 28+ messages in thread
From: Joe Perches @ 2010-09-14  4:23 UTC (permalink / raw)
  To: linux-kernel; +Cc: Tony Luck, Fenghua Yu, linux-ia64

Signed-off-by: Joe Perches <joe@perches.com>
---
 arch/ia64/kernel/palinfo.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/ia64/kernel/palinfo.c b/arch/ia64/kernel/palinfo.c
index fdf6f9d..77597e5 100644
--- a/arch/ia64/kernel/palinfo.c
+++ b/arch/ia64/kernel/palinfo.c
@@ -434,7 +434,7 @@ register_info(char *page)
 	unsigned long phys_stacked;
 	pal_hints_u_t hints;
 	unsigned long iregs, dregs;
-	char *info_type[]={
+	static const char * const info_type[] = {
 		"Implemented AR(s)",
 		"AR(s) with read side-effects",
 		"Implemented CR(s)",
-- 
1.7.3.rc1


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH next 02/16] arch/ia64: Use static const char * const where possible
@ 2010-09-14  4:23   ` Joe Perches
  0 siblings, 0 replies; 28+ messages in thread
From: Joe Perches @ 2010-09-14  4:23 UTC (permalink / raw)
  To: linux-kernel; +Cc: Tony Luck, Fenghua Yu, linux-ia64

Signed-off-by: Joe Perches <joe@perches.com>
---
 arch/ia64/kernel/palinfo.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/ia64/kernel/palinfo.c b/arch/ia64/kernel/palinfo.c
index fdf6f9d..77597e5 100644
--- a/arch/ia64/kernel/palinfo.c
+++ b/arch/ia64/kernel/palinfo.c
@@ -434,7 +434,7 @@ register_info(char *page)
 	unsigned long phys_stacked;
 	pal_hints_u_t hints;
 	unsigned long iregs, dregs;
-	char *info_type[]={
+	static const char * const info_type[] = {
 		"Implemented AR(s)",
 		"AR(s) with read side-effects",
 		"Implemented CR(s)",
-- 
1.7.3.rc1


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH next 03/16] arch/microblaze: Use static const char * const where possible
  2010-09-14  4:23 ` Joe Perches
                   ` (3 preceding siblings ...)
  (?)
@ 2010-09-14  4:23 ` Joe Perches
  2010-09-14  5:59   ` Michal Simek
  -1 siblings, 1 reply; 28+ messages in thread
From: Joe Perches @ 2010-09-14  4:23 UTC (permalink / raw)
  To: linux-kernel; +Cc: Michal Simek, microblaze-uclinux

Signed-off-by: Joe Perches <joe@perches.com>
---
 arch/microblaze/kernel/heartbeat.c |   10 +++++-----
 arch/microblaze/kernel/timer.c     |   12 ++++++------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/arch/microblaze/kernel/heartbeat.c b/arch/microblaze/kernel/heartbeat.c
index 5227517..f8bc2d7 100644
--- a/arch/microblaze/kernel/heartbeat.c
+++ b/arch/microblaze/kernel/heartbeat.c
@@ -47,11 +47,11 @@ void setup_heartbeat(void)
 	struct device_node *gpio = NULL;
 	int *prop;
 	int j;
-	char *gpio_list[] = {
-				"xlnx,xps-gpio-1.00.a",
-				"xlnx,opb-gpio-1.00.a",
-				NULL
-			};
+	const char * const gpio_list[] = {
+		"xlnx,xps-gpio-1.00.a",
+		"xlnx,opb-gpio-1.00.a",
+		NULL
+	};
 
 	for (j = 0; gpio_list[j] != NULL; j++) {
 		gpio = of_find_compatible_node(NULL, NULL, gpio_list[j]);
diff --git a/arch/microblaze/kernel/timer.c b/arch/microblaze/kernel/timer.c
index ec7df67..da9d1e5 100644
--- a/arch/microblaze/kernel/timer.c
+++ b/arch/microblaze/kernel/timer.c
@@ -258,12 +258,12 @@ void __init time_init(void)
 				0
 			};
 #endif
-	char *timer_list[] = {
-				"xlnx,xps-timer-1.00.a",
-				"xlnx,opb-timer-1.00.b",
-				"xlnx,opb-timer-1.00.a",
-				NULL
-			};
+	const char * const timer_list[] = {
+		"xlnx,xps-timer-1.00.a",
+		"xlnx,opb-timer-1.00.b",
+		"xlnx,opb-timer-1.00.a",
+		NULL
+	};
 
 	for (i = 0; timer_list[i] != NULL; i++) {
 		timer = of_find_compatible_node(NULL, NULL, timer_list[i]);
-- 
1.7.3.rc1


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH next 04/16] arch/x86: Use static const char * const where possible
  2010-09-14  4:23 ` Joe Perches
                   ` (4 preceding siblings ...)
  (?)
@ 2010-09-14  4:23 ` Joe Perches
  -1 siblings, 0 replies; 28+ messages in thread
From: Joe Perches @ 2010-09-14  4:23 UTC (permalink / raw)
  To: linux-kernel
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86, Avi Kivity,
	Marcelo Tosatti, kvm

Signed-off-by: Joe Perches <joe@perches.com>
---
 arch/x86/kernel/smpboot.c |    2 +-
 arch/x86/kvm/mmu.c        |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 63a1a55..b745b30 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -498,7 +498,7 @@ static void impress_friends(void)
 void __inquire_remote_apic(int apicid)
 {
 	unsigned i, regs[] = { APIC_ID >> 4, APIC_LVR >> 4, APIC_SPIV >> 4 };
-	char *names[] = { "ID", "VERSION", "SPIV" };
+	const char * const names[] = { "ID", "VERSION", "SPIV" };
 	int timeout;
 	u32 status;
 
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index d2dad65..2a7d567 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -56,7 +56,7 @@ enum {
 	AUDIT_POST_PTE_WRITE
 };
 
-char *audit_point_name[] = {
+const char * const audit_point_name[] = {
 	"pre page fault",
 	"post page fault",
 	"pre pte write",
-- 
1.7.3.rc1


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH next 05/16] drivers/gpu: Use static const char * const where possible
  2010-09-14  4:23 ` Joe Perches
@ 2010-09-14  4:23   ` Joe Perches
  -1 siblings, 0 replies; 28+ messages in thread
From: Joe Perches @ 2010-09-14  4:23 UTC (permalink / raw)
  To: linux-kernel; +Cc: David Airlie, dri-devel

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/gpu/drm/ttm/ttm_page_alloc.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c
index ca90479..578ea3b 100644
--- a/drivers/gpu/drm/ttm/ttm_page_alloc.c
+++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c
@@ -836,7 +836,9 @@ int ttm_page_alloc_debugfs(struct seq_file *m, void *data)
 {
 	struct ttm_page_pool *p;
 	unsigned i;
-	char *h[] = {"pool", "refills", "pages freed", "size"};
+	static const char * const h[] = {
+		"pool", "refills", "pages freed", "size"
+	};
 	if (!_manager) {
 		seq_printf(m, "No pool allocator running.\n");
 		return 0;
-- 
1.7.3.rc1


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH next 05/16] drivers/gpu: Use static const char * const where possible
@ 2010-09-14  4:23   ` Joe Perches
  0 siblings, 0 replies; 28+ messages in thread
From: Joe Perches @ 2010-09-14  4:23 UTC (permalink / raw)
  To: linux-kernel; +Cc: dri-devel

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/gpu/drm/ttm/ttm_page_alloc.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c
index ca90479..578ea3b 100644
--- a/drivers/gpu/drm/ttm/ttm_page_alloc.c
+++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c
@@ -836,7 +836,9 @@ int ttm_page_alloc_debugfs(struct seq_file *m, void *data)
 {
 	struct ttm_page_pool *p;
 	unsigned i;
-	char *h[] = {"pool", "refills", "pages freed", "size"};
+	static const char * const h[] = {
+		"pool", "refills", "pages freed", "size"
+	};
 	if (!_manager) {
 		seq_printf(m, "No pool allocator running.\n");
 		return 0;
-- 
1.7.3.rc1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH next 06/16] drivers/isdn: Use static const char * const where possible
  2010-09-14  4:23 ` Joe Perches
                   ` (6 preceding siblings ...)
  (?)
@ 2010-09-14  4:23 ` Joe Perches
  -1 siblings, 0 replies; 28+ messages in thread
From: Joe Perches @ 2010-09-14  4:23 UTC (permalink / raw)
  To: linux-kernel; +Cc: Karsten Keil, netdev

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/isdn/pcbit/edss1.c |    2 +-
 drivers/isdn/pcbit/edss1.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/isdn/pcbit/edss1.c b/drivers/isdn/pcbit/edss1.c
index d5920ae..80c9c16 100644
--- a/drivers/isdn/pcbit/edss1.c
+++ b/drivers/isdn/pcbit/edss1.c
@@ -33,7 +33,7 @@
 #include "callbacks.h"
 
 
-char * isdn_state_table[] = {
+const char * const isdn_state_table[] = {
   "Closed",
   "Call initiated",
   "Overlap sending",
diff --git a/drivers/isdn/pcbit/edss1.h b/drivers/isdn/pcbit/edss1.h
index 0b64f97..39f8346 100644
--- a/drivers/isdn/pcbit/edss1.h
+++ b/drivers/isdn/pcbit/edss1.h
@@ -90,7 +90,7 @@ struct fsm_timer_entry {
 	unsigned long timeout;          /* in seconds */
 };
 
-extern char * isdn_state_table[];
+extern const char * const isdn_state_table[];
 
 void pcbit_fsm_event(struct pcbit_dev *, struct pcbit_chan *,
 		     unsigned short event, struct callb_data *);
-- 
1.7.3.rc1


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH next 07/16] drivers/net: Use static const char * const where possible
  2010-09-14  4:23 ` Joe Perches
                   ` (7 preceding siblings ...)
  (?)
@ 2010-09-14  4:23 ` Joe Perches
  -1 siblings, 0 replies; 28+ messages in thread
From: Joe Perches @ 2010-09-14  4:23 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mika Kuoppala, netdev

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/3c515.c  |    4 +++-
 drivers/net/eth16i.c |    4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/3c515.c b/drivers/net/3c515.c
index 8a6eb0c..cdf7226 100644
--- a/drivers/net/3c515.c
+++ b/drivers/net/3c515.c
@@ -662,7 +662,9 @@ static int corkscrew_setup(struct net_device *dev, int ioaddr,
 		pr_warning(" *** Warning: this IRQ is unlikely to work! ***\n");
 
 	{
-		char *ram_split[] = { "5:3", "3:1", "1:1", "3:5" };
+		static const char * const ram_split[] = {
+			"5:3", "3:1", "1:1", "3:5"
+		};
 		__u32 config;
 		EL3WINDOW(3);
 		vp->available_media = inw(ioaddr + Wn3_Options);
diff --git a/drivers/net/eth16i.c b/drivers/net/eth16i.c
index 10e39f2..ce22e15 100644
--- a/drivers/net/eth16i.c
+++ b/drivers/net/eth16i.c
@@ -637,7 +637,9 @@ static void eth16i_initialize(struct net_device *dev, int boot)
 
 	/* Set interface port type */
 	if(boot) {
-		char *porttype[] = {"BNC", "DIX", "TP", "AUTO", "FROM_EPROM" };
+		static const char * const porttype[] = {
+			"BNC", "DIX", "TP", "AUTO", "FROM_EPROM"
+		};
 
 		switch(dev->if_port)
 		{
-- 
1.7.3.rc1


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH next 08/16] drivers/net/pcmcia: Use static const char * const where possible
  2010-09-14  4:23 ` Joe Perches
                   ` (8 preceding siblings ...)
  (?)
@ 2010-09-14  4:23 ` Joe Perches
  -1 siblings, 0 replies; 28+ messages in thread
From: Joe Perches @ 2010-09-14  4:23 UTC (permalink / raw)
  To: linux-kernel; +Cc: netdev

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/pcmcia/3c589_cs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/pcmcia/3c589_cs.c b/drivers/net/pcmcia/3c589_cs.c
index 7f2baf5..35562a3 100644
--- a/drivers/net/pcmcia/3c589_cs.c
+++ b/drivers/net/pcmcia/3c589_cs.c
@@ -266,7 +266,7 @@ static int tc589_config(struct pcmcia_device *link)
     __be16 *phys_addr;
     int ret, i, j, multi = 0, fifo;
     unsigned int ioaddr;
-    char *ram_split[] = {"5:3", "3:1", "1:1", "3:5"};
+    static const char * const ram_split[] = {"5:3", "3:1", "1:1", "3:5"};
     u8 *buf;
     size_t len;
 
-- 
1.7.3.rc1


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH next 09/16] drivers/net/wireless: Use static const char * const where possible
  2010-09-14  4:23 ` Joe Perches
                   ` (9 preceding siblings ...)
  (?)
@ 2010-09-14  4:23 ` Joe Perches
  2010-09-14  7:12   ` Ivo Van Doorn
  -1 siblings, 1 reply; 28+ messages in thread
From: Joe Perches @ 2010-09-14  4:23 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ivo van Doorn, Gertjan van Wingerde, John W. Linville,
	linux-wireless, users, netdev

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/wireless/rt2x00/rt2x00debug.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2x00debug.c b/drivers/net/wireless/rt2x00/rt2x00debug.c
index b8cf45c..c1710b2 100644
--- a/drivers/net/wireless/rt2x00/rt2x00debug.c
+++ b/drivers/net/wireless/rt2x00/rt2x00debug.c
@@ -380,7 +380,7 @@ static ssize_t rt2x00debug_read_crypto_stats(struct file *file,
 					     loff_t *offset)
 {
 	struct rt2x00debug_intf *intf = file->private_data;
-	char *name[] = { "WEP64", "WEP128", "TKIP", "AES" };
+	static const char * const name[] = { "WEP64", "WEP128", "TKIP", "AES" };
 	char *data;
 	char *temp;
 	size_t size;
-- 
1.7.3.rc1


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH next 10/16] drivers/scsi: Use static const char * const where possible
  2010-09-14  4:23 ` Joe Perches
                   ` (10 preceding siblings ...)
  (?)
@ 2010-09-14  4:23 ` Joe Perches
  -1 siblings, 0 replies; 28+ messages in thread
From: Joe Perches @ 2010-09-14  4:23 UTC (permalink / raw)
  To: linux-kernel
  Cc: Jing Huang, James E.J. Bottomley, YOKOTA Hiroshi, Andrew Vasquez,
	linux-driver, Ravi Anand, Vikas Chaudhary, iscsi-driver,
	linux-scsi

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/scsi/bfa/rport.c        |    4 +++-
 drivers/scsi/pcmcia/nsp_debug.c |    2 +-
 drivers/scsi/qla2xxx/qla_nx.c   |    4 ++--
 drivers/scsi/qla4xxx/ql4_nx.c   |    2 +-
 4 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/scsi/bfa/rport.c b/drivers/scsi/bfa/rport.c
index 9b4c2c9..803f29e 100644
--- a/drivers/scsi/bfa/rport.c
+++ b/drivers/scsi/bfa/rport.c
@@ -2068,7 +2068,9 @@ bfa_fcs_rport_aen_post(struct bfa_fcs_rport_s *rport,
 	wwn_t           rpwwn = rport->pwwn;
 	char            lpwwn_ptr[BFA_STRING_32];
 	char            rpwwn_ptr[BFA_STRING_32];
-	char           *prio_str[] = { "unknown", "high", "medium", "low" };
+	static const char * const prio_str[] = {
+		"unknown", "high", "medium", "low"
+	};
 
 	wwn2str(lpwwn_ptr, lpwwn);
 	wwn2str(rpwwn_ptr, rpwwn);
diff --git a/drivers/scsi/pcmcia/nsp_debug.c b/drivers/scsi/pcmcia/nsp_debug.c
index 3c6ef64..dbd567c 100644
--- a/drivers/scsi/pcmcia/nsp_debug.c
+++ b/drivers/scsi/pcmcia/nsp_debug.c
@@ -147,7 +147,7 @@ static void show_phase(struct scsi_cmnd *SCpnt)
 {
 	int i = SCpnt->SCp.phase;
 
-	char *ph[] = {
+	static const char * const ph[] = {
 		"PH_UNDETERMINED",
 		"PH_ARBSTART",
 		"PH_SELSTART",
diff --git a/drivers/scsi/qla2xxx/qla_nx.c b/drivers/scsi/qla2xxx/qla_nx.c
index c5ac876..7525e95 100644
--- a/drivers/scsi/qla2xxx/qla_nx.c
+++ b/drivers/scsi/qla2xxx/qla_nx.c
@@ -327,8 +327,8 @@ unsigned qla82xx_crb_hub_agt[64] = {
 };
 
 /* Device states */
-char *qdev_state[] = {
-	 "Unknown",
+static const char * const qdev_state[] = {
+	"Unknown",
 	"Cold",
 	"Initializing",
 	"Ready",
diff --git a/drivers/scsi/qla4xxx/ql4_nx.c b/drivers/scsi/qla4xxx/ql4_nx.c
index 5d4a382..77ee640 100644
--- a/drivers/scsi/qla4xxx/ql4_nx.c
+++ b/drivers/scsi/qla4xxx/ql4_nx.c
@@ -332,7 +332,7 @@ static unsigned qla4_8xxx_crb_hub_agt[64] = {
 };
 
 /* Device states */
-static char *qdev_state[] = {
+static const char * const qdev_state[] = {
 	"Unknown",
 	"Cold",
 	"Initializing",
-- 
1.7.3.rc1


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH next 11/16] drivers/staging: Use static const char * const where possible
  2010-09-14  4:23 ` Joe Perches
                   ` (11 preceding siblings ...)
  (?)
@ 2010-09-14  4:23 ` Joe Perches
  -1 siblings, 0 replies; 28+ messages in thread
From: Joe Perches @ 2010-09-14  4:23 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, devel

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/staging/ath6kl/os/linux/ar6000_drv.c |   14 +++++++-------
 drivers/staging/bcm/Debug.c                  |    5 +++--
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/ath6kl/os/linux/ar6000_drv.c b/drivers/staging/ath6kl/os/linux/ar6000_drv.c
index ff7976e..16c9999 100644
--- a/drivers/staging/ath6kl/os/linux/ar6000_drv.c
+++ b/drivers/staging/ath6kl/os/linux/ar6000_drv.c
@@ -5079,13 +5079,13 @@ ar6000_hbChallengeResp_event(AR_SOFTC_T *ar, A_UINT32 cookie, A_UINT32 source)
 void
 ar6000_reportError_event(AR_SOFTC_T *ar, WMI_TARGET_ERROR_VAL errorVal)
 {
-    char    *errString[] = {
-                [WMI_TARGET_PM_ERR_FAIL]    "WMI_TARGET_PM_ERR_FAIL",
-                [WMI_TARGET_KEY_NOT_FOUND]  "WMI_TARGET_KEY_NOT_FOUND",
-                [WMI_TARGET_DECRYPTION_ERR] "WMI_TARGET_DECRYPTION_ERR",
-                [WMI_TARGET_BMISS]          "WMI_TARGET_BMISS",
-                [WMI_PSDISABLE_NODE_JOIN]   "WMI_PSDISABLE_NODE_JOIN"
-                };
+	static const char * const errString[] = {
+		[WMI_TARGET_PM_ERR_FAIL]    "WMI_TARGET_PM_ERR_FAIL",
+		[WMI_TARGET_KEY_NOT_FOUND]  "WMI_TARGET_KEY_NOT_FOUND",
+		[WMI_TARGET_DECRYPTION_ERR] "WMI_TARGET_DECRYPTION_ERR",
+		[WMI_TARGET_BMISS]          "WMI_TARGET_BMISS",
+		[WMI_PSDISABLE_NODE_JOIN]   "WMI_PSDISABLE_NODE_JOIN"
+	};
 
     A_PRINTF("AR6000 Error on Target. Error = 0x%x\n", errorVal);
 
diff --git a/drivers/staging/bcm/Debug.c b/drivers/staging/bcm/Debug.c
index 213f4bc..d01eb12 100644
--- a/drivers/staging/bcm/Debug.c
+++ b/drivers/staging/bcm/Debug.c
@@ -1,12 +1,13 @@
 #include "headers.h"
 
-char *buff_dump_base[]={"DEC", "HEX",  "OCT", "BIN"	};
-
 static UINT current_debug_level=BCM_SCREAM;
 
 int bcm_print_buffer( UINT debug_level, const char *function_name,
 				  char *file_name, int line_number, unsigned char *buffer, int bufferlen, unsigned int base)
 {
+	static const char * const buff_dump_base[] = {
+		"DEC", "HEX", "OCT", "BIN"
+	};
 	if(debug_level>=current_debug_level)
 	{
 		int i=0;
-- 
1.7.3.rc1


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH next 12/16] drivers/usb: Use static const char * const where possible
  2010-09-14  4:23 ` Joe Perches
                   ` (12 preceding siblings ...)
  (?)
@ 2010-09-14  4:23 ` Joe Perches
  -1 siblings, 0 replies; 28+ messages in thread
From: Joe Perches @ 2010-09-14  4:23 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, linux-usb

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/usb/host/oxu210hp-hcd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/host/oxu210hp-hcd.c b/drivers/usb/host/oxu210hp-hcd.c
index 8026dc8..32149be 100644
--- a/drivers/usb/host/oxu210hp-hcd.c
+++ b/drivers/usb/host/oxu210hp-hcd.c
@@ -3687,7 +3687,7 @@ static void oxu_configuration(struct platform_device *pdev, void *base)
 static int oxu_verify_id(struct platform_device *pdev, void *base)
 {
 	u32 id;
-	char *bo[] = {
+	static const char * const bo[] = {
 		"reserved",
 		"128-pin LQFP",
 		"84-pin TFBGA",
-- 
1.7.3.rc1


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH next 13/16] drivers/watchdog: Use static const char * const where possible
  2010-09-14  4:23 ` Joe Perches
                   ` (13 preceding siblings ...)
  (?)
@ 2010-09-14  4:23 ` Joe Perches
  -1 siblings, 0 replies; 28+ messages in thread
From: Joe Perches @ 2010-09-14  4:23 UTC (permalink / raw)
  To: linux-kernel; +Cc: Wim Van Sebroeck, linux-watchdog

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/watchdog/machzwd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/watchdog/machzwd.c b/drivers/watchdog/machzwd.c
index 2d118cf..edffe68 100644
--- a/drivers/watchdog/machzwd.c
+++ b/drivers/watchdog/machzwd.c
@@ -388,7 +388,7 @@ static struct notifier_block zf_notifier = {
 
 static void __init zf_show_action(int act)
 {
-	char *str[] = { "RESET", "SMI", "NMI", "SCI" };
+	static const char * const str[] = { "RESET", "SMI", "NMI", "SCI" };
 
 	printk(KERN_INFO PFX ": Watchdog using action = %s\n", str[act]);
 }
-- 
1.7.3.rc1


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH next 14/16] fs: Use static const char * const where possible
  2010-09-14  4:23 ` Joe Perches
                   ` (14 preceding siblings ...)
  (?)
@ 2010-09-14  4:24 ` Joe Perches
  -1 siblings, 0 replies; 28+ messages in thread
From: Joe Perches @ 2010-09-14  4:24 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alexander Viro, linux-fsdevel

Signed-off-by: Joe Perches <joe@perches.com>
---
 fs/binfmt_flat.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c
index 811384b..d53e0d6 100644
--- a/fs/binfmt_flat.c
+++ b/fs/binfmt_flat.c
@@ -382,7 +382,9 @@ failed:
 void old_reloc(unsigned long rl)
 {
 #ifdef DEBUG
-	char *segment[] = { "TEXT", "DATA", "BSS", "*UNKNOWN*" };
+	static const char * const segment[] = {
+		"TEXT", "DATA", "BSS", "*UNKNOWN*"
+	};
 #endif
 	flat_v2_reloc_t	r;
 	unsigned long *ptr;
-- 
1.7.3.rc1


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH next 15/16] net/irda: Use static const char * const where possible
  2010-09-14  4:23 ` Joe Perches
                   ` (15 preceding siblings ...)
  (?)
@ 2010-09-14  4:24 ` Joe Perches
  -1 siblings, 0 replies; 28+ messages in thread
From: Joe Perches @ 2010-09-14  4:24 UTC (permalink / raw)
  To: linux-kernel; +Cc: Samuel Ortiz, David S. Miller, netdev

Signed-off-by: Joe Perches <joe@perches.com>
---
 include/net/irda/irlan_event.h |    2 +-
 net/irda/irlan/irlan_event.c   |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/net/irda/irlan_event.h b/include/net/irda/irlan_event.h
index 6d9539f..018b5a7 100644
--- a/include/net/irda/irlan_event.h
+++ b/include/net/irda/irlan_event.h
@@ -67,7 +67,7 @@ typedef enum {
 	IRLAN_WATCHDOG_TIMEOUT,
 } IRLAN_EVENT;
 
-extern char *irlan_state[];
+extern const char * const irlan_state[];
 
 void irlan_do_client_event(struct irlan_cb *self, IRLAN_EVENT event, 
 			   struct sk_buff *skb);
diff --git a/net/irda/irlan/irlan_event.c b/net/irda/irlan/irlan_event.c
index cbcb4eb..43f1604 100644
--- a/net/irda/irlan/irlan_event.c
+++ b/net/irda/irlan/irlan_event.c
@@ -24,7 +24,7 @@
 
 #include <net/irda/irlan_event.h>
 
-char *irlan_state[] = {
+const char * const irlan_state[] = {
 	"IRLAN_IDLE",
 	"IRLAN_QUERY",
 	"IRLAN_CONN",
-- 
1.7.3.rc1


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH next 16/16] sound: Use static const char * const where possible
  2010-09-14  4:23 ` Joe Perches
                   ` (16 preceding siblings ...)
  (?)
@ 2010-09-14  4:24 ` Joe Perches
  2010-09-14 14:17     ` Takashi Iwai
  -1 siblings, 1 reply; 28+ messages in thread
From: Joe Perches @ 2010-09-14  4:24 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jaroslav Kysela, Takashi Iwai, alsa-devel

Signed-off-by: Joe Perches <joe@perches.com>
---
 sound/core/misc.c       |    5 +----
 sound/core/pcm_native.c |    2 +-
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/sound/core/misc.c b/sound/core/misc.c
index 0e5e77f..2c41825 100644
--- a/sound/core/misc.c
+++ b/sound/core/misc.c
@@ -64,15 +64,12 @@ static int print_snd_pfx(unsigned int level, const char *path, int line,
 			 const char *format)
 {
 	const char *file = sanity_file_name(path);
-	char tmp[sizeof("<0>")];
+	char tmp[] = "<0>";
 	const char *pfx = level ? KERN_DEBUG : KERN_DEFAULT;
 	int ret = 0;
 
 	if (format[0] == '<' && format[2] == '>') {
-		tmp[0] = '<';
 		tmp[1] = format[1];
-		tmp[2] = '>';
-		tmp[3] = 0;
 		pfx = tmp;
 		ret = 1;
 	}
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index e2e7389..eb40942 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -142,7 +142,7 @@ int snd_pcm_info_user(struct snd_pcm_substream *substream,
 
 #ifdef RULES_DEBUG
 #define HW_PARAM(v) [SNDRV_PCM_HW_PARAM_##v] = #v
-char *snd_pcm_hw_param_names[] = {
+static const char * const snd_pcm_hw_param_names[] = {
 	HW_PARAM(ACCESS),
 	HW_PARAM(FORMAT),
 	HW_PARAM(SUBFORMAT),
-- 
1.7.3.rc1


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* Re: [PATCH next 03/16] arch/microblaze: Use static const char * const where possible
  2010-09-14  4:23 ` [PATCH next 03/16] arch/microblaze: " Joe Perches
@ 2010-09-14  5:59   ` Michal Simek
  0 siblings, 0 replies; 28+ messages in thread
From: Michal Simek @ 2010-09-14  5:59 UTC (permalink / raw)
  To: Joe Perches; +Cc: linux-kernel, microblaze-uclinux

Joe Perches wrote:
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  arch/microblaze/kernel/heartbeat.c |   10 +++++-----
>  arch/microblaze/kernel/timer.c     |   12 ++++++------
>  2 files changed, 11 insertions(+), 11 deletions(-)
> 


Applied.

Thanks,
Michal


-- 
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH next 09/16] drivers/net/wireless: Use static const char * const where possible
  2010-09-14  4:23 ` [PATCH next 09/16] drivers/net/wireless: " Joe Perches
@ 2010-09-14  7:12   ` Ivo Van Doorn
  0 siblings, 0 replies; 28+ messages in thread
From: Ivo Van Doorn @ 2010-09-14  7:12 UTC (permalink / raw)
  To: Joe Perches
  Cc: linux-kernel, Gertjan van Wingerde, John W. Linville,
	linux-wireless, users, netdev

On Tue, Sep 14, 2010 at 6:23 AM, Joe Perches <joe@perches.com> wrote:
> Signed-off-by: Joe Perches <joe@perches.com>

Acked-by: Ivo van Doorn <IvDoorn@gmail.com>

> ---
>  drivers/net/wireless/rt2x00/rt2x00debug.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/rt2x00/rt2x00debug.c b/drivers/net/wireless/rt2x00/rt2x00debug.c
> index b8cf45c..c1710b2 100644
> --- a/drivers/net/wireless/rt2x00/rt2x00debug.c
> +++ b/drivers/net/wireless/rt2x00/rt2x00debug.c
> @@ -380,7 +380,7 @@ static ssize_t rt2x00debug_read_crypto_stats(struct file *file,
>                                             loff_t *offset)
>  {
>        struct rt2x00debug_intf *intf = file->private_data;
> -       char *name[] = { "WEP64", "WEP128", "TKIP", "AES" };
> +       static const char * const name[] = { "WEP64", "WEP128", "TKIP", "AES" };
>        char *data;
>        char *temp;
>        size_t size;
> --
> 1.7.3.rc1
>
>

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH next 16/16] sound: Use static const char * const where possible
  2010-09-14  4:24 ` [PATCH next 16/16] sound: " Joe Perches
@ 2010-09-14 14:17     ` Takashi Iwai
  0 siblings, 0 replies; 28+ messages in thread
From: Takashi Iwai @ 2010-09-14 14:17 UTC (permalink / raw)
  To: Joe Perches; +Cc: linux-kernel, Jaroslav Kysela, alsa-devel

At Mon, 13 Sep 2010 21:24:02 -0700,
Joe Perches wrote:
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Applied the second chunk (as the first chunk is the revert of your
previous patch).


thanks,

Takashi

> ---
>  sound/core/misc.c       |    5 +----
>  sound/core/pcm_native.c |    2 +-
>  2 files changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/sound/core/misc.c b/sound/core/misc.c
> index 0e5e77f..2c41825 100644
> --- a/sound/core/misc.c
> +++ b/sound/core/misc.c
> @@ -64,15 +64,12 @@ static int print_snd_pfx(unsigned int level, const char *path, int line,
>  			 const char *format)
>  {
>  	const char *file = sanity_file_name(path);
> -	char tmp[sizeof("<0>")];
> +	char tmp[] = "<0>";
>  	const char *pfx = level ? KERN_DEBUG : KERN_DEFAULT;
>  	int ret = 0;
>  
>  	if (format[0] == '<' && format[2] == '>') {
> -		tmp[0] = '<';
>  		tmp[1] = format[1];
> -		tmp[2] = '>';
> -		tmp[3] = 0;
>  		pfx = tmp;
>  		ret = 1;
>  	}
> diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
> index e2e7389..eb40942 100644
> --- a/sound/core/pcm_native.c
> +++ b/sound/core/pcm_native.c
> @@ -142,7 +142,7 @@ int snd_pcm_info_user(struct snd_pcm_substream *substream,
>  
>  #ifdef RULES_DEBUG
>  #define HW_PARAM(v) [SNDRV_PCM_HW_PARAM_##v] = #v
> -char *snd_pcm_hw_param_names[] = {
> +static const char * const snd_pcm_hw_param_names[] = {
>  	HW_PARAM(ACCESS),
>  	HW_PARAM(FORMAT),
>  	HW_PARAM(SUBFORMAT),
> -- 
> 1.7.3.rc1
> 

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH next 16/16] sound: Use static const char * const where possible
@ 2010-09-14 14:17     ` Takashi Iwai
  0 siblings, 0 replies; 28+ messages in thread
From: Takashi Iwai @ 2010-09-14 14:17 UTC (permalink / raw)
  To: Joe Perches; +Cc: alsa-devel, linux-kernel

At Mon, 13 Sep 2010 21:24:02 -0700,
Joe Perches wrote:
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Applied the second chunk (as the first chunk is the revert of your
previous patch).


thanks,

Takashi

> ---
>  sound/core/misc.c       |    5 +----
>  sound/core/pcm_native.c |    2 +-
>  2 files changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/sound/core/misc.c b/sound/core/misc.c
> index 0e5e77f..2c41825 100644
> --- a/sound/core/misc.c
> +++ b/sound/core/misc.c
> @@ -64,15 +64,12 @@ static int print_snd_pfx(unsigned int level, const char *path, int line,
>  			 const char *format)
>  {
>  	const char *file = sanity_file_name(path);
> -	char tmp[sizeof("<0>")];
> +	char tmp[] = "<0>";
>  	const char *pfx = level ? KERN_DEBUG : KERN_DEFAULT;
>  	int ret = 0;
>  
>  	if (format[0] == '<' && format[2] == '>') {
> -		tmp[0] = '<';
>  		tmp[1] = format[1];
> -		tmp[2] = '>';
> -		tmp[3] = 0;
>  		pfx = tmp;
>  		ret = 1;
>  	}
> diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
> index e2e7389..eb40942 100644
> --- a/sound/core/pcm_native.c
> +++ b/sound/core/pcm_native.c
> @@ -142,7 +142,7 @@ int snd_pcm_info_user(struct snd_pcm_substream *substream,
>  
>  #ifdef RULES_DEBUG
>  #define HW_PARAM(v) [SNDRV_PCM_HW_PARAM_##v] = #v
> -char *snd_pcm_hw_param_names[] = {
> +static const char * const snd_pcm_hw_param_names[] = {
>  	HW_PARAM(ACCESS),
>  	HW_PARAM(FORMAT),
>  	HW_PARAM(SUBFORMAT),
> -- 
> 1.7.3.rc1
> 

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH next 01/16] arch/alpha: Use static const char * const where possible
  2010-09-14  4:23 ` [PATCH next 01/16] arch/alpha: " Joe Perches
@ 2010-09-14 15:37   ` Richard Henderson
  2010-09-14 17:03     ` Matt Turner
  1 sibling, 0 replies; 28+ messages in thread
From: Richard Henderson @ 2010-09-14 15:37 UTC (permalink / raw)
  To: Joe Perches; +Cc: linux-kernel, Ivan Kokshaysky, Matt Turner, linux-alpha

On 09/13/2010 09:23 PM, Joe Perches wrote:
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  arch/alpha/kernel/err_ev6.c    |   12 +++++++-----
>  arch/alpha/kernel/err_marvel.c |   33 +++++++++++++++++----------------
>  arch/alpha/kernel/err_titan.c  |   35 ++++++++++++++++++++---------------
>  arch/alpha/kernel/osf_sys.c    |    4 ++--
>  4 files changed, 46 insertions(+), 38 deletions(-)

Acked-by: Richard Henderson  <rth@twiddle.net>


r~

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH next 01/16] arch/alpha: Use static const char * const where possible
  2010-09-14  4:23 ` [PATCH next 01/16] arch/alpha: " Joe Perches
@ 2010-09-14 17:03     ` Matt Turner
  2010-09-14 17:03     ` Matt Turner
  1 sibling, 0 replies; 28+ messages in thread
From: Matt Turner @ 2010-09-14 17:03 UTC (permalink / raw)
  To: Joe Perches; +Cc: linux-kernel, Richard Henderson, Ivan Kokshaysky, linux-alpha

On Tue, Sep 14, 2010 at 12:23 AM, Joe Perches <joe@perches.com> wrote:
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  arch/alpha/kernel/err_ev6.c    |   12 +++++++-----
>  arch/alpha/kernel/err_marvel.c |   33 +++++++++++++++++----------------
>  arch/alpha/kernel/err_titan.c  |   35 ++++++++++++++++++++---------------
>  arch/alpha/kernel/osf_sys.c    |    4 ++--
>  4 files changed, 46 insertions(+), 38 deletions(-)
>
> diff --git a/arch/alpha/kernel/err_ev6.c b/arch/alpha/kernel/err_ev6.c
> index 8ca6345..253cf1a 100644
> --- a/arch/alpha/kernel/err_ev6.c
> +++ b/arch/alpha/kernel/err_ev6.c
> @@ -90,11 +90,13 @@ static int
>  ev6_parse_cbox(u64 c_addr, u64 c1_syn, u64 c2_syn,
>               u64 c_stat, u64 c_sts, int print)
>  {
> -       char *sourcename[] = { "UNKNOWN", "UNKNOWN", "UNKNOWN",
> -                              "MEMORY", "BCACHE", "DCACHE",
> -                              "BCACHE PROBE", "BCACHE PROBE" };
> -       char *streamname[] = { "D", "I" };
> -       char *bitsname[] = { "SINGLE", "DOUBLE" };
> +       static const char * const sourcename[] = {
> +               "UNKNOWN", "UNKNOWN", "UNKNOWN",
> +               "MEMORY", "BCACHE", "DCACHE",
> +               "BCACHE PROBE", "BCACHE PROBE"
> +       };
> +       static const char * const streamname[] = { "D", "I" };
> +       static const char * const bitsname[] = { "SINGLE", "DOUBLE" };
>        int status = MCHK_DISPOSITION_REPORT;
>        int source = -1, stream = -1, bits = -1;
>
> diff --git a/arch/alpha/kernel/err_marvel.c b/arch/alpha/kernel/err_marvel.c
> index 5c905aa..648ae88 100644
> --- a/arch/alpha/kernel/err_marvel.c
> +++ b/arch/alpha/kernel/err_marvel.c
> @@ -589,22 +589,23 @@ marvel_print_pox_spl_cmplt(u64 spl_cmplt)
>  static void
>  marvel_print_pox_trans_sum(u64 trans_sum)
>  {
> -       char *pcix_cmd[] = { "Interrupt Acknowledge",
> -                            "Special Cycle",
> -                            "I/O Read",
> -                            "I/O Write",
> -                            "Reserved",
> -                            "Reserved / Device ID Message",
> -                            "Memory Read",
> -                            "Memory Write",
> -                            "Reserved / Alias to Memory Read Block",
> -                            "Reserved / Alias to Memory Write Block",
> -                            "Configuration Read",
> -                            "Configuration Write",
> -                            "Memory Read Multiple / Split Completion",
> -                            "Dual Address Cycle",
> -                            "Memory Read Line / Memory Read Block",
> -                            "Memory Write and Invalidate / Memory Write Block"
> +       static const char * const pcix_cmd[] = {
> +               "Interrupt Acknowledge",
> +               "Special Cycle",
> +               "I/O Read",
> +               "I/O Write",
> +               "Reserved",
> +               "Reserved / Device ID Message",
> +               "Memory Read",
> +               "Memory Write",
> +               "Reserved / Alias to Memory Read Block",
> +               "Reserved / Alias to Memory Write Block",
> +               "Configuration Read",
> +               "Configuration Write",
> +               "Memory Read Multiple / Split Completion",
> +               "Dual Address Cycle",
> +               "Memory Read Line / Memory Read Block",
> +               "Memory Write and Invalidate / Memory Write Block"
>        };
>
>  #define IO7__POX_TRANSUM__PCI_ADDR__S          (0)
> diff --git a/arch/alpha/kernel/err_titan.c b/arch/alpha/kernel/err_titan.c
> index f7ed97c..c3b3781 100644
> --- a/arch/alpha/kernel/err_titan.c
> +++ b/arch/alpha/kernel/err_titan.c
> @@ -75,8 +75,12 @@ titan_parse_p_serror(int which, u64 serror, int print)
>        int status = MCHK_DISPOSITION_REPORT;
>
>  #ifdef CONFIG_VERBOSE_MCHECK
> -       char *serror_src[] = {"GPCI", "APCI", "AGP HP", "AGP LP"};
> -       char *serror_cmd[] = {"DMA Read", "DMA RMW", "SGTE Read", "Reserved"};
> +       static const char * const serror_src[] = {
> +               "GPCI", "APCI", "AGP HP", "AGP LP"
> +       };
> +       static const char * const serror_cmd[] = {
> +               "DMA Read", "DMA RMW", "SGTE Read", "Reserved"
> +       };
>  #endif /* CONFIG_VERBOSE_MCHECK */
>
>  #define TITAN__PCHIP_SERROR__LOST_UECC (1UL << 0)
> @@ -140,14 +144,15 @@ titan_parse_p_perror(int which, int port, u64 perror, int print)
>        int status = MCHK_DISPOSITION_REPORT;
>
>  #ifdef CONFIG_VERBOSE_MCHECK
> -       char *perror_cmd[] = { "Interrupt Acknowledge", "Special Cycle",
> -                              "I/O Read",              "I/O Write",
> -                              "Reserved",              "Reserved",
> -                              "Memory Read",           "Memory Write",
> -                              "Reserved",              "Reserved",
> -                              "Configuration Read",    "Configuration Write",
> -                              "Memory Read Multiple",  "Dual Address Cycle",
> -                              "Memory Read Line","Memory Write and Invalidate"
> +       static const char * const perror_cmd[] = {
> +               "Interrupt Acknowledge", "Special Cycle",
> +               "I/O Read",             "I/O Write",
> +               "Reserved",             "Reserved",
> +               "Memory Read",          "Memory Write",
> +               "Reserved",             "Reserved",
> +               "Configuration Read",   "Configuration Write",
> +               "Memory Read Multiple", "Dual Address Cycle",
> +               "Memory Read Line",     "Memory Write and Invalidate"
>        };
>  #endif /* CONFIG_VERBOSE_MCHECK */
>
> @@ -273,11 +278,11 @@ titan_parse_p_agperror(int which, u64 agperror, int print)
>        int cmd, len;
>        unsigned long addr;
>
> -       char *agperror_cmd[] = { "Read (low-priority)", "Read (high-priority)",
> -                                "Write (low-priority)",
> -                                "Write (high-priority)",
> -                                "Reserved",            "Reserved",
> -                                "Flush",               "Fence"
> +       static const char * const agperror_cmd[] = {
> +               "Read (low-priority)",  "Read (high-priority)",
> +               "Write (low-priority)", "Write (high-priority)",
> +               "Reserved",             "Reserved",
> +               "Flush",                "Fence"
>        };
>  #endif /* CONFIG_VERBOSE_MCHECK */
>
> diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c
> index 5d1e6d6..16bc1f5 100644
> --- a/arch/alpha/kernel/osf_sys.c
> +++ b/arch/alpha/kernel/osf_sys.c
> @@ -594,7 +594,7 @@ SYSCALL_DEFINE2(osf_sigstack, struct sigstack __user *, uss,
>
>  SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
>  {
> -       char *sysinfo_table[] = {
> +       const char *sysinfo_table[] = {
>                utsname()->sysname,
>                utsname()->nodename,
>                utsname()->release,
> @@ -606,7 +606,7 @@ SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
>                "dummy",        /* secure RPC domain */
>        };
>        unsigned long offset;
> -       char *res;
> +       const char *res;
>        long len, err = -EINVAL;
>
>        offset = command-1;
> --
> 1.7.3.rc1

Thanks Joe. I'll vacuum this up.

Matt

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH next 01/16] arch/alpha: Use static const char * const where possible
@ 2010-09-14 17:03     ` Matt Turner
  0 siblings, 0 replies; 28+ messages in thread
From: Matt Turner @ 2010-09-14 17:03 UTC (permalink / raw)
  To: Joe Perches; +Cc: linux-kernel, Richard Henderson, Ivan Kokshaysky, linux-alpha

On Tue, Sep 14, 2010 at 12:23 AM, Joe Perches <joe@perches.com> wrote:
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  arch/alpha/kernel/err_ev6.c    |   12 +++++++-----
>  arch/alpha/kernel/err_marvel.c |   33 +++++++++++++++++----------------
>  arch/alpha/kernel/err_titan.c  |   35 ++++++++++++++++++++---------------
>  arch/alpha/kernel/osf_sys.c    |    4 ++--
>  4 files changed, 46 insertions(+), 38 deletions(-)
>
> diff --git a/arch/alpha/kernel/err_ev6.c b/arch/alpha/kernel/err_ev6.c
> index 8ca6345..253cf1a 100644
> --- a/arch/alpha/kernel/err_ev6.c
> +++ b/arch/alpha/kernel/err_ev6.c
> @@ -90,11 +90,13 @@ static int
>  ev6_parse_cbox(u64 c_addr, u64 c1_syn, u64 c2_syn,
>               u64 c_stat, u64 c_sts, int print)
>  {
> -       char *sourcename[] = { "UNKNOWN", "UNKNOWN", "UNKNOWN",
> -                              "MEMORY", "BCACHE", "DCACHE",
> -                              "BCACHE PROBE", "BCACHE PROBE" };
> -       char *streamname[] = { "D", "I" };
> -       char *bitsname[] = { "SINGLE", "DOUBLE" };
> +       static const char * const sourcename[] = {
> +               "UNKNOWN", "UNKNOWN", "UNKNOWN",
> +               "MEMORY", "BCACHE", "DCACHE",
> +               "BCACHE PROBE", "BCACHE PROBE"
> +       };
> +       static const char * const streamname[] = { "D", "I" };
> +       static const char * const bitsname[] = { "SINGLE", "DOUBLE" };
>        int status = MCHK_DISPOSITION_REPORT;
>        int source = -1, stream = -1, bits = -1;
>
> diff --git a/arch/alpha/kernel/err_marvel.c b/arch/alpha/kernel/err_marvel.c
> index 5c905aa..648ae88 100644
> --- a/arch/alpha/kernel/err_marvel.c
> +++ b/arch/alpha/kernel/err_marvel.c
> @@ -589,22 +589,23 @@ marvel_print_pox_spl_cmplt(u64 spl_cmplt)
>  static void
>  marvel_print_pox_trans_sum(u64 trans_sum)
>  {
> -       char *pcix_cmd[] = { "Interrupt Acknowledge",
> -                            "Special Cycle",
> -                            "I/O Read",
> -                            "I/O Write",
> -                            "Reserved",
> -                            "Reserved / Device ID Message",
> -                            "Memory Read",
> -                            "Memory Write",
> -                            "Reserved / Alias to Memory Read Block",
> -                            "Reserved / Alias to Memory Write Block",
> -                            "Configuration Read",
> -                            "Configuration Write",
> -                            "Memory Read Multiple / Split Completion",
> -                            "Dual Address Cycle",
> -                            "Memory Read Line / Memory Read Block",
> -                            "Memory Write and Invalidate / Memory Write Block"
> +       static const char * const pcix_cmd[] = {
> +               "Interrupt Acknowledge",
> +               "Special Cycle",
> +               "I/O Read",
> +               "I/O Write",
> +               "Reserved",
> +               "Reserved / Device ID Message",
> +               "Memory Read",
> +               "Memory Write",
> +               "Reserved / Alias to Memory Read Block",
> +               "Reserved / Alias to Memory Write Block",
> +               "Configuration Read",
> +               "Configuration Write",
> +               "Memory Read Multiple / Split Completion",
> +               "Dual Address Cycle",
> +               "Memory Read Line / Memory Read Block",
> +               "Memory Write and Invalidate / Memory Write Block"
>        };
>
>  #define IO7__POX_TRANSUM__PCI_ADDR__S          (0)
> diff --git a/arch/alpha/kernel/err_titan.c b/arch/alpha/kernel/err_titan.c
> index f7ed97c..c3b3781 100644
> --- a/arch/alpha/kernel/err_titan.c
> +++ b/arch/alpha/kernel/err_titan.c
> @@ -75,8 +75,12 @@ titan_parse_p_serror(int which, u64 serror, int print)
>        int status = MCHK_DISPOSITION_REPORT;
>
>  #ifdef CONFIG_VERBOSE_MCHECK
> -       char *serror_src[] = {"GPCI", "APCI", "AGP HP", "AGP LP"};
> -       char *serror_cmd[] = {"DMA Read", "DMA RMW", "SGTE Read", "Reserved"};
> +       static const char * const serror_src[] = {
> +               "GPCI", "APCI", "AGP HP", "AGP LP"
> +       };
> +       static const char * const serror_cmd[] = {
> +               "DMA Read", "DMA RMW", "SGTE Read", "Reserved"
> +       };
>  #endif /* CONFIG_VERBOSE_MCHECK */
>
>  #define TITAN__PCHIP_SERROR__LOST_UECC (1UL << 0)
> @@ -140,14 +144,15 @@ titan_parse_p_perror(int which, int port, u64 perror, int print)
>        int status = MCHK_DISPOSITION_REPORT;
>
>  #ifdef CONFIG_VERBOSE_MCHECK
> -       char *perror_cmd[] = { "Interrupt Acknowledge", "Special Cycle",
> -                              "I/O Read",              "I/O Write",
> -                              "Reserved",              "Reserved",
> -                              "Memory Read",           "Memory Write",
> -                              "Reserved",              "Reserved",
> -                              "Configuration Read",    "Configuration Write",
> -                              "Memory Read Multiple",  "Dual Address Cycle",
> -                              "Memory Read Line","Memory Write and Invalidate"
> +       static const char * const perror_cmd[] = {
> +               "Interrupt Acknowledge", "Special Cycle",
> +               "I/O Read",             "I/O Write",
> +               "Reserved",             "Reserved",
> +               "Memory Read",          "Memory Write",
> +               "Reserved",             "Reserved",
> +               "Configuration Read",   "Configuration Write",
> +               "Memory Read Multiple", "Dual Address Cycle",
> +               "Memory Read Line",     "Memory Write and Invalidate"
>        };
>  #endif /* CONFIG_VERBOSE_MCHECK */
>
> @@ -273,11 +278,11 @@ titan_parse_p_agperror(int which, u64 agperror, int print)
>        int cmd, len;
>        unsigned long addr;
>
> -       char *agperror_cmd[] = { "Read (low-priority)", "Read (high-priority)",
> -                                "Write (low-priority)",
> -                                "Write (high-priority)",
> -                                "Reserved",            "Reserved",
> -                                "Flush",               "Fence"
> +       static const char * const agperror_cmd[] = {
> +               "Read (low-priority)",  "Read (high-priority)",
> +               "Write (low-priority)", "Write (high-priority)",
> +               "Reserved",             "Reserved",
> +               "Flush",                "Fence"
>        };
>  #endif /* CONFIG_VERBOSE_MCHECK */
>
> diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c
> index 5d1e6d6..16bc1f5 100644
> --- a/arch/alpha/kernel/osf_sys.c
> +++ b/arch/alpha/kernel/osf_sys.c
> @@ -594,7 +594,7 @@ SYSCALL_DEFINE2(osf_sigstack, struct sigstack __user *, uss,
>
>  SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
>  {
> -       char *sysinfo_table[] = {
> +       const char *sysinfo_table[] = {
>                utsname()->sysname,
>                utsname()->nodename,
>                utsname()->release,
> @@ -606,7 +606,7 @@ SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
>                "dummy",        /* secure RPC domain */
>        };
>        unsigned long offset;
> -       char *res;
> +       const char *res;
>        long len, err = -EINVAL;
>
>        offset = command-1;
> --
> 1.7.3.rc1

Thanks Joe. I'll vacuum this up.

Matt
--
To unsubscribe from this list: send the line "unsubscribe linux-alpha" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2010-09-14 17:04 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-14  4:23 [PATCH next 00/16] treewide: Use static const char * const where possible Joe Perches
2010-09-14  4:23 ` Joe Perches
2010-09-14  4:23 ` Joe Perches
2010-09-14  4:23 ` [PATCH next 01/16] arch/alpha: " Joe Perches
2010-09-14 15:37   ` Richard Henderson
2010-09-14 17:03   ` Matt Turner
2010-09-14 17:03     ` Matt Turner
2010-09-14  4:23 ` [PATCH next 02/16] arch/ia64: " Joe Perches
2010-09-14  4:23   ` Joe Perches
2010-09-14  4:23 ` [PATCH next 03/16] arch/microblaze: " Joe Perches
2010-09-14  5:59   ` Michal Simek
2010-09-14  4:23 ` [PATCH next 04/16] arch/x86: " Joe Perches
2010-09-14  4:23 ` [PATCH next 05/16] drivers/gpu: " Joe Perches
2010-09-14  4:23   ` Joe Perches
2010-09-14  4:23 ` [PATCH next 06/16] drivers/isdn: " Joe Perches
2010-09-14  4:23 ` [PATCH next 07/16] drivers/net: " Joe Perches
2010-09-14  4:23 ` [PATCH next 08/16] drivers/net/pcmcia: " Joe Perches
2010-09-14  4:23 ` [PATCH next 09/16] drivers/net/wireless: " Joe Perches
2010-09-14  7:12   ` Ivo Van Doorn
2010-09-14  4:23 ` [PATCH next 10/16] drivers/scsi: " Joe Perches
2010-09-14  4:23 ` [PATCH next 11/16] drivers/staging: " Joe Perches
2010-09-14  4:23 ` [PATCH next 12/16] drivers/usb: " Joe Perches
2010-09-14  4:23 ` [PATCH next 13/16] drivers/watchdog: " Joe Perches
2010-09-14  4:24 ` [PATCH next 14/16] fs: " Joe Perches
2010-09-14  4:24 ` [PATCH next 15/16] net/irda: " Joe Perches
2010-09-14  4:24 ` [PATCH next 16/16] sound: " Joe Perches
2010-09-14 14:17   ` Takashi Iwai
2010-09-14 14:17     ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.