* [PATCH 0/4] staging: remove explicit intialization of static ints
@ 2015-03-12 4:26 Supriya Karanth
2015-03-12 4:26 ` [PATCH 1/4] staging: i2o: remove " Supriya Karanth
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Supriya Karanth @ 2015-03-12 4:26 UTC (permalink / raw)
To: iskaranth, outreachy-kernel
static integer variables are initialized to 0 by the compiler
and it's not necessary to explicitly intialize them
This patchset removes the explicit intialization.
This issue was found by checkpatch.pl :
ERROR: do not initialise statics to 0 or NULL
These changes were made using coccinelle script:
@@
type T;
identifier var;
@@
static T var
- =0
;
Supriya Karanth (4):
staging: i2o: remove intialization of static ints
staging: rtl8188eu: remove intialization of static ints
staging: rtl8723au: remove intialization of static ints
staging: sm750fb: remove intialization of static ints
drivers/staging/i2o/i2o_block.c | 2 +-
drivers/staging/i2o/i2o_config.c | 2 +-
drivers/staging/i2o/iop.c | 2 +-
drivers/staging/rtl8188eu/os_dep/os_intfs.c | 2 +-
drivers/staging/rtl8723au/core/rtw_security.c | 2 +-
drivers/staging/rtl8723au/os_dep/os_intfs.c | 2 +-
drivers/staging/sm750fb/sm750.c | 6 +++---
7 files changed, 9 insertions(+), 9 deletions(-)
--
2.1.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/4] staging: i2o: remove intialization of static ints
2015-03-12 4:26 [PATCH 0/4] staging: remove explicit intialization of static ints Supriya Karanth
@ 2015-03-12 4:26 ` Supriya Karanth
2015-03-12 4:26 ` [PATCH 2/4] staging: rtl8188eu: " Supriya Karanth
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Supriya Karanth @ 2015-03-12 4:26 UTC (permalink / raw)
To: iskaranth, outreachy-kernel
static ints are initialized to 0 by the compiler.
Explicit initialization is not necessary.
Found by checkpatch.pl - ERROR: do not initialise statics to 0 or NULL
changes made using coccinelle script:
@@
type T;
identifier var;
@@
static T var
- =0
;
Signed-off-by: Supriya Karanth <iskaranth@gmail.com>
---
drivers/staging/i2o/i2o_block.c | 2 +-
drivers/staging/i2o/i2o_config.c | 2 +-
drivers/staging/i2o/iop.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/i2o/i2o_block.c b/drivers/staging/i2o/i2o_block.c
index 0a13c64..7784787 100644
--- a/drivers/staging/i2o/i2o_block.c
+++ b/drivers/staging/i2o/i2o_block.c
@@ -1028,7 +1028,7 @@ static int i2o_block_probe(struct device *dev)
struct i2o_block_device *i2o_blk_dev;
struct gendisk *gd;
struct request_queue *queue;
- static int unit = 0;
+ static int unit;
int rc;
u64 size;
u32 blocksize;
diff --git a/drivers/staging/i2o/i2o_config.c b/drivers/staging/i2o/i2o_config.c
index 5748663..cd7ca5e 100644
--- a/drivers/staging/i2o/i2o_config.c
+++ b/drivers/staging/i2o/i2o_config.c
@@ -64,7 +64,7 @@ struct i2o_cfg_info {
struct i2o_cfg_info *next;
};
static struct i2o_cfg_info *open_files = NULL;
-static ulong i2o_cfg_info_id = 0;
+static ulong i2o_cfg_info_id;
static int i2o_cfg_getiops(unsigned long arg)
{
diff --git a/drivers/staging/i2o/iop.c b/drivers/staging/i2o/iop.c
index 52334fc..6cae63c 100644
--- a/drivers/staging/i2o/iop.c
+++ b/drivers/staging/i2o/iop.c
@@ -1042,7 +1042,7 @@ static void i2o_iop_release(struct device *dev)
*/
struct i2o_controller *i2o_iop_alloc(void)
{
- static int unit = 0; /* 0 and 1 are NULL IOP and Local Host */
+ static int unit; /* 0 and 1 are NULL IOP and Local Host */
struct i2o_controller *c;
char poolname[32];
--
2.1.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/4] staging: rtl8188eu: remove intialization of static ints
2015-03-12 4:26 [PATCH 0/4] staging: remove explicit intialization of static ints Supriya Karanth
2015-03-12 4:26 ` [PATCH 1/4] staging: i2o: remove " Supriya Karanth
@ 2015-03-12 4:26 ` Supriya Karanth
2015-03-12 4:26 ` [PATCH 3/4] staging: rtl8723au: " Supriya Karanth
2015-03-12 4:26 ` [PATCH 4/4] staging: sm750fb: " Supriya Karanth
3 siblings, 0 replies; 5+ messages in thread
From: Supriya Karanth @ 2015-03-12 4:26 UTC (permalink / raw)
To: iskaranth, outreachy-kernel
static ints are initialized to 0 by the compiler.
Explicit initialization is not necessary.
Found by checkpatch.pl - ERROR: do not initialise statics to 0 or NULL
changes made using coccinelle script:
@@
type T;
identifier var;
@@
static T var
- =0
;
Signed-off-by: Supriya Karanth <iskaranth@gmail.com>
---
drivers/staging/rtl8188eu/os_dep/os_intfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8188eu/os_dep/os_intfs.c b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
index 88a909c..d762e25 100644
--- a/drivers/staging/rtl8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
@@ -38,7 +38,7 @@ MODULE_VERSION(DRIVERVERSION);
#define RTW_NOTCH_FILTER 0 /* 0:Disable, 1:Enable, */
/* module param defaults */
-static int rtw_chip_version = 0x00;
+static int rtw_chip_version;
static int rtw_rfintfs = HWPI;
static int rtw_lbkmode;/* RTL8712_AIR_TRX; */
static int rtw_network_mode = Ndis802_11IBSS;/* Ndis802_11Infrastructure; infra, ad-hoc, auto */
--
2.1.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/4] staging: rtl8723au: remove intialization of static ints
2015-03-12 4:26 [PATCH 0/4] staging: remove explicit intialization of static ints Supriya Karanth
2015-03-12 4:26 ` [PATCH 1/4] staging: i2o: remove " Supriya Karanth
2015-03-12 4:26 ` [PATCH 2/4] staging: rtl8188eu: " Supriya Karanth
@ 2015-03-12 4:26 ` Supriya Karanth
2015-03-12 4:26 ` [PATCH 4/4] staging: sm750fb: " Supriya Karanth
3 siblings, 0 replies; 5+ messages in thread
From: Supriya Karanth @ 2015-03-12 4:26 UTC (permalink / raw)
To: iskaranth, outreachy-kernel
static ints are initialized to 0 by the compiler.
Explicit initialization is not necessary.
Found by checkpatch.pl - ERROR: do not initialise statics to 0 or NULL
changes made using coccinelle script:
@@
type T;
identifier var;
@@
static T var
- =0
;
Signed-off-by: Supriya Karanth <iskaranth@gmail.com>
---
drivers/staging/rtl8723au/core/rtw_security.c | 2 +-
drivers/staging/rtl8723au/os_dep/os_intfs.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8723au/core/rtw_security.c b/drivers/staging/rtl8723au/core/rtw_security.c
index 0610d5f..045a24c 100644
--- a/drivers/staging/rtl8723au/core/rtw_security.c
+++ b/drivers/staging/rtl8723au/core/rtw_security.c
@@ -87,7 +87,7 @@ static void arcfour_encrypt( struct arc4context *parc4ctx,
}
-static int bcrc32initialized = 0;
+static int bcrc32initialized;
static u32 crc32_table[256];
static u8 crc32_reverseBit(u8 data)
diff --git a/drivers/staging/rtl8723au/os_dep/os_intfs.c b/drivers/staging/rtl8723au/os_dep/os_intfs.c
index 1b23eb1..db6a1597 100644
--- a/drivers/staging/rtl8723au/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723au/os_dep/os_intfs.c
@@ -34,7 +34,7 @@ MODULE_FIRMWARE("rtlwifi/rtl8723aufw_B.bin");
MODULE_FIRMWARE("rtlwifi/rtl8723aufw_B_NoBT.bin");
/* module param defaults */
-static int rtw_chip_version = 0x00;
+static int rtw_chip_version;
static int rtw_rfintfs = HWPI;
static int rtw_debug = 1;
--
2.1.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 4/4] staging: sm750fb: remove intialization of static ints
2015-03-12 4:26 [PATCH 0/4] staging: remove explicit intialization of static ints Supriya Karanth
` (2 preceding siblings ...)
2015-03-12 4:26 ` [PATCH 3/4] staging: rtl8723au: " Supriya Karanth
@ 2015-03-12 4:26 ` Supriya Karanth
3 siblings, 0 replies; 5+ messages in thread
From: Supriya Karanth @ 2015-03-12 4:26 UTC (permalink / raw)
To: iskaranth, outreachy-kernel
static ints are initialized to 0 by the compiler.
Explicit initialization is not necessary.
Found by checkpatch.pl - ERROR: do not initialise statics to 0 or NULL
changes made using coccinelle script:
@@
type T;
identifier var;
@@
static T var
- =0
;
Signed-off-by: Supriya Karanth <iskaranth@gmail.com>
---
drivers/staging/sm750fb/sm750.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index aa0888c..343137f 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -46,14 +46,14 @@ typedef int (*PROC_SPEC_INITHW)(struct lynx_share*,struct pci_dev*);
/* common var for all device */
static int g_hwcursor = 1;
-static int g_noaccel = 0;
+static int g_noaccel;
#ifdef CONFIG_MTRR
-static int g_nomtrr = 0;
+static int g_nomtrr;
#endif
static const char * g_fbmode[] = {NULL,NULL};
static const char * g_def_fbmode = "800x600-16@60";
static char * g_settings = NULL;
-static int g_dualview = 0;
+static int g_dualview;
static char * g_option = NULL;
/* if not use spin_lock,system will die if user load driver
--
2.1.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-03-12 4:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-12 4:26 [PATCH 0/4] staging: remove explicit intialization of static ints Supriya Karanth
2015-03-12 4:26 ` [PATCH 1/4] staging: i2o: remove " Supriya Karanth
2015-03-12 4:26 ` [PATCH 2/4] staging: rtl8188eu: " Supriya Karanth
2015-03-12 4:26 ` [PATCH 3/4] staging: rtl8723au: " Supriya Karanth
2015-03-12 4:26 ` [PATCH 4/4] staging: sm750fb: " Supriya Karanth
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.