Trivial string form cleanups
Subsystems (6)
Change of string form like Jeff Garzik suggested
it at http://janitor.kernelnewbies.org/TODO
to get better assembly output as this format only
declares a single variable.
--- arch/ppc/platforms/4xx/xilinx_ml300.c | 2 +- arch/ppc/platforms/4xx/xilinx_ml403.c | 2 +- drivers/atm/fore200e_mkfirm.c | 6 +++--- drivers/net/cris/eth_v10.c | 2 +- drivers/net/fs_enet/mii-fec.c | 2 +- drivers/net/isa-skeleton.c | 4 ++-- drivers/net/wan/c101.c | 4 ++-- drivers/net/wan/hdlc.c | 2 +- drivers/net/wan/n2.c | 4 ++-- drivers/net/wan/pc300too.c | 4 ++-- drivers/net/wan/pci200syn.c | 4 ++-- drivers/net/wan/sdla.c | 2 +- drivers/net/wan/wanxl.c | 2 +- drivers/sbus/char/bpp.c | 2 +- 14 files changed, 21 insertions(+), 21 deletions(-)
drivers/net/wan/n2.c +2 -2
@@ -33,8 +33,8 @@#include "hd64570.h" -static const char * version ="SDL RISCom/N2 driver version: 1.15" ; -static const char * devname ="RISCom/N2" ; +static const char version[] ="SDL RISCom/N2 driver version: 1.15" ; +static const char devname[] ="RISCom/N2" ;#undef DEBUG_PKT#define DEBUG_RINGS
arch/ppc/platforms/4xx/xilinx_ml300.c +1 -1
@@ -53,7 +53,7 @@* ppc4xx_pic_init arch/ppc/syslib/xilinx_pic.c */ -const char * virtex_machine_name ="ML300 Reference Design" ; +const char virtex_machine_name[] ="ML300 Reference Design" ;#if defined(XPAR_POWER_0_POWERDOWN_BASEADDR ) static volatile unsigned *powerdown_base =
arch/ppc/platforms/4xx/xilinx_ml403.c +1 -1
@@ -55,7 +55,7 @@* ppc4xx_pic_init arch/ppc/syslib/xilinx_pic.c */ -const char * virtex_machine_name ="ML403 Reference Design" ; +const char virtex_machine_name[] ="ML403 Reference Design" ;#if defined(XPAR_POWER_0_POWERDOWN_BASEADDR ) static volatile unsigned *powerdown_base =
drivers/net/wan/sdla.c +1 -1
@@ -57,7 +57,7 @@#include <asm/dma.h> #include <asm/uaccess.h> -static const char * version ="SDLA driver v0.30, 12 Sep 1996, [email protected]" ; +static const char version[] ="SDLA driver v0.30, 12 Sep 1996, [email protected]" ;static unsigned int valid_port[] = {0x250 ,0x270 ,0x280 ,0x300 ,0x350 ,0x360 ,0x380 ,0x390 };
drivers/net/wan/wanxl.c +1 -1
@@ -32,7 +32,7 @@#include "wanxl.h" -static const char * version ="wanXL serial card driver version: 0.48" ; +static const char version[] ="wanXL serial card driver version: 0.48" ;#define PLX_CTL_RESET 0x40000000/* adapter reset */
drivers/net/wan/c101.c +2 -2
@@ -30,8 +30,8 @@#include "hd64570.h" -static const char * version ="Moxa C101 driver version: 1.15" ; -static const char * devname ="C101" ; +static const char version[] ="Moxa C101 driver version: 1.15" ; +static const char devname[] ="C101" ;#undef DEBUG_PKT#define DEBUG_RINGS
drivers/net/wan/hdlc.c +1 -1
@@ -38,7 +38,7 @@#include <linux/hdlc.h> -static const char * version ="HDLC support module revision 1.21" ; +static const char version[] ="HDLC support module revision 1.21" ;#undef DEBUG_LINK
drivers/net/wan/pci200syn.c +2 -2
@@ -33,8 +33,8 @@#include "hd64572.h" -static const char * version ="Goramo PCI200SYN driver version: 1.16" ; -static const char * devname ="PCI200SYN" ; +static const char version[] ="Goramo PCI200SYN driver version: 1.16" ; +static const char devname[] ="PCI200SYN" ;#undef DEBUG_PKT#define DEBUG_RINGS
drivers/net/wan/pc300too.c +2 -2
@@ -37,8 +37,8 @@#include "hd64572.h" -static const char * version ="Cyclades PC300 driver version: 1.17" ; -static const char * devname ="PC300" ; +static const char version[] ="Cyclades PC300 driver version: 1.17" ; +static const char devname[] ="PC300" ;#undef DEBUG_PKT#define DEBUG_RINGS
drivers/net/isa-skeleton.c +2 -2
@@ -22,7 +22,7 @@* */ -static const char *version = +static const char version[] ="isa-skeleton.c:v1.51 9/24/94 Donald Becker ([email protected])\n" ;/*
@@ -65,7 +65,7 @@ static const char *version =* The name of the card. Is used for messages and in the requests for * io regions, irqs and dma channels */ -static const char * cardname ="netcard" ; +static const char cardname[] ="netcard" ;/* First, a few definitions that the brave might change. */
drivers/net/fs_enet/mii-fec.c +1 -1
@@ -66,7 +66,7 @@ static int fs_mii_fec_init(struct fec_in {struct resource *r;fec_t *fecp; -char * name ="fsl-cpm-fec" ; +char name[] ="fsl-cpm-fec" ;/* we need fec in order to be useful */ struct platform_device *fec_pdev =
drivers/net/cris/eth_v10.c +1 -1
@@ -259,7 +259,7 @@* io regions, irqs and dma channels */ -static const char * cardname ="ETRAX 100LX built-in ethernet controller" ; +static const char cardname[] ="ETRAX 100LX built-in ethernet controller" ;/* A default ethernet address. Highlevel SW will set the real one later */
drivers/sbus/char/bpp.c +1 -1
@@ -41,7 +41,7 @@#define BPP_DELAY 100static const unsigned BPP_MAJOR =LP_MAJOR ; -static const char * dev_name ="bpp" ; +static const char dev_name[] ="bpp" ;/* When switching from compatibility to a mode where I can read, try the following mode first. */
drivers/atm/fore200e_mkfirm.c +3 -3
@@ -14,9 +14,9 @@#include <sys/types.h> #include <time.h> -char * default_basename ="pca200e" ;/* was initially written for the PCA-200E firmware */ -char * default_infname ="<stdin>" ; -char * default_outfname ="<stdout>" ; +char default_basename[] ="pca200e" ;/* was initially written for the PCA-200E firmware */ +char default_infname[] ="<stdin>" ; +char default_outfname[] ="<stdout>" ;char * progname;int verbose =0 ;
Quoted 5 lines · Frank Seidel
Change of string form like Jeff Garzik suggested
it at http://janitor.kernelnewbies.org/TODO
to get better assembly output as this format only
declares a single variable.
Saves sizeof(char *) per string too, but you need to be careful none of these are being passed to sizeof or typeof. Did you check for that in your conversions?
J
Quoted 3 lines · Jeremy Fitzhardinge
Saves
sizeof(char *)per string too, but you need to be careful none of these are being passed to sizeof or typeof. Did you check for that in your conversions?
Yes, i did, but i just went through them again to make it sure and i really couldn't see any sizeof, typeof or other suspicious usages of those strings in this set of cleanups.
Thanks,
Frank