* [PATCH next 06/16] drivers/isdn: Use static const char * const where possible
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 ` [PATCH next 07/16] drivers/net: " Joe Perches
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ 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] 7+ messages in thread* [PATCH next 07/16] drivers/net: Use static const char * const where possible
2010-09-14 4:23 [PATCH next 00/16] treewide: Use static const char * const where possible Joe Perches
2010-09-14 4:23 ` [PATCH next 06/16] drivers/isdn: " Joe Perches
@ 2010-09-14 4:23 ` Joe Perches
2010-09-14 4:23 ` [PATCH next 08/16] drivers/net/pcmcia: " Joe Perches
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ 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] 7+ messages in thread* [PATCH next 08/16] drivers/net/pcmcia: Use static const char * const where possible
2010-09-14 4:23 [PATCH next 00/16] treewide: Use static const char * const where possible 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 ` Joe Perches
2010-09-14 4:23 ` [PATCH next 09/16] drivers/net/wireless: " Joe Perches
2010-09-14 4:24 ` [PATCH next 15/16] net/irda: " Joe Perches
4 siblings, 0 replies; 7+ 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] 7+ messages in thread* [PATCH next 09/16] drivers/net/wireless: Use static const char * const where possible
2010-09-14 4:23 [PATCH next 00/16] treewide: Use static const char * const where possible Joe Perches
` (2 preceding siblings ...)
2010-09-14 4:23 ` [PATCH next 08/16] drivers/net/pcmcia: " Joe Perches
@ 2010-09-14 4:23 ` Joe Perches
2010-09-14 7:12 ` Ivo Van Doorn
2010-09-14 4:24 ` [PATCH next 15/16] net/irda: " Joe Perches
4 siblings, 1 reply; 7+ 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] 7+ 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; 7+ 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] 7+ messages in thread
* [PATCH next 15/16] net/irda: Use static const char * const where possible
2010-09-14 4:23 [PATCH next 00/16] treewide: Use static const char * const where possible Joe Perches
` (3 preceding siblings ...)
2010-09-14 4:23 ` [PATCH next 09/16] drivers/net/wireless: " Joe Perches
@ 2010-09-14 4:24 ` Joe Perches
4 siblings, 0 replies; 7+ 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] 7+ messages in thread