staging: lustre: remove initialization of static ints
authorSupriya Karanth <iskaranth@gmail.com>
Tue, 3 Mar 2015 14:48:21 +0000 (23:48 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Mar 2015 17:54:33 +0000 (09:54 -0800)
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;
+static T var;

Signed-off-by: Supriya Karanth <iskaranth@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c
drivers/staging/lustre/lustre/libcfs/tracefile.c
drivers/staging/lustre/lustre/llite/statahead.c
drivers/staging/lustre/lustre/mgc/mgc_request.c
drivers/staging/lustre/lustre/obdclass/genops.c
drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
drivers/staging/lustre/lustre/obdclass/lu_object.c
drivers/staging/lustre/lustre/ptlrpc/pack_generic.c
drivers/staging/lustre/lustre/ptlrpc/pinger.c
drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c

index 0f65929a852492615becb1b69d879398f57f258d..3100cb1385482a2bf8da217766a5fad9f6a219d5 100644 (file)
@@ -165,7 +165,7 @@ static int proc_dobitmasks(struct ctl_table *table, int write,
                                 __proc_dobitmasks);
 }
 
-static int min_watchdog_ratelimit = 0;   /* disable ratelimiting */
+static int min_watchdog_ratelimit;       /* disable ratelimiting */
 static int max_watchdog_ratelimit = (24*60*60); /* limit to once per day */
 
 static int __proc_dump_kernel(void *data, int write,
index f8d8a2f7069181a8bcd93462b774634a7ff52763..c86394f7f4d9c32294eeb52a650255e4c24d208d 100644 (file)
@@ -53,7 +53,7 @@ char cfs_tracefile[TRACEFILE_NAME_SIZE];
 long long cfs_tracefile_size = CFS_TRACEFILE_SIZE;
 static struct tracefiled_ctl trace_tctl;
 struct mutex cfs_trace_thread_mutex;
-static int thread_running = 0;
+static int thread_running;
 
 static atomic_t cfs_tage_allocated = ATOMIC_INIT(0);
 
index 6ad9dd0fe2b3d9d7da842e9af2d895a1097c42e6..fe732fa0d01ffd2d4fa9586e6f96e14af3a5dd72 100644 (file)
@@ -84,7 +84,7 @@ struct ll_sa_entry {
        struct qstr          se_qstr;
 };
 
-static unsigned int sai_generation = 0;
+static unsigned int sai_generation;
 static DEFINE_SPINLOCK(sai_generation_lock);
 
 static inline int ll_sa_entry_unhashed(struct ll_sa_entry *entry)
index b24457554798c8c29350957d198eb89b98a2a363..0375bfe29a7de559d6aa638052fa300de2312137 100644 (file)
@@ -479,7 +479,7 @@ int lprocfs_mgc_rd_ir_state(struct seq_file *m, void *data)
 #define RQ_NOW     0x2
 #define RQ_LATER   0x4
 #define RQ_STOP    0x8
-static int                 rq_state = 0;
+static int rq_state;
 static wait_queue_head_t           rq_waitq;
 static DECLARE_COMPLETION(rq_exit);
 
index 82508210465eeb7090aee285725d4b7156319836..6d440b4658601c7de01c64f1f4d3320890c09493 100644 (file)
@@ -1559,7 +1559,7 @@ void obd_exports_barrier(struct obd_device *obd)
 EXPORT_SYMBOL(obd_exports_barrier);
 
 /* Total amount of zombies to be destroyed */
-static int zombies_count = 0;
+static int zombies_count;
 
 /**
  * kill zombie imports and exports
index 55e80818bd5d571b11e08422ccb5a95762678f15..c171c6c6c457cda82fedc82c29880ae3e0618dcd 100644 (file)
@@ -223,7 +223,7 @@ EXPORT_SYMBOL(lprocfs_write_frac_helper);
 
 #if defined (CONFIG_PROC_FS)
 
-static int lprocfs_no_percpu_stats = 0;
+static int lprocfs_no_percpu_stats;
 module_param(lprocfs_no_percpu_stats, int, 0644);
 MODULE_PARM_DESC(lprocfs_no_percpu_stats, "Do not alloc percpu data for lprocfs stats");
 
index d2311f246c4ae40dbe2dae9b286d948d714518bb..20c0779951fd7c7db9d21513eb5e5ebb820ecb2c 100644 (file)
@@ -1308,7 +1308,7 @@ static DEFINE_SPINLOCK(lu_keys_guard);
  * lu_context_refill(). No locking is provided, as initialization and shutdown
  * are supposed to be externally serialized.
  */
-static unsigned key_set_version = 0;
+static unsigned key_set_version;
 
 /**
  * Register new key.
index 2f45f765783040994c2271db210834092a02eeef..eb6ff902080ca45b2dc8b928da4a746fdffab9ff 100644 (file)
@@ -117,7 +117,7 @@ EXPORT_SYMBOL(lustre_msg_check_version);
 /* early reply size */
 int lustre_msg_early_size(void)
 {
-       static int size = 0;
+       static int size;
        if (!size) {
                /* Always reply old ptlrpc_body_v2 to keep interoprability
                 * with the old client (< 2.3) which doesn't have pb_jobid
index 340d98a64137adc25291a7ae4242a4cbbd5836f9..9dbda9332dd828289c963cc49a64b8a07ac347c3 100644 (file)
@@ -545,7 +545,7 @@ void ptlrpc_pinger_wake_up(void)
 #define PET_READY     1
 #define PET_TERMINATE 2
 
-static int            pet_refcount = 0;
+static int pet_refcount;
 static int            pet_state;
 static wait_queue_head_t       pet_waitq;
 LIST_HEAD(pet_list);
index 4621b71fe0b6bc971db94d2b32643faa09436f80..8f7be84aa187d066d8b972bc7d411f951c7fa5d9 100644 (file)
@@ -85,7 +85,7 @@ MODULE_PARM_DESC(ptlrpcd_bind_policy, "Ptlrpcd threads binding mode.");
 static struct ptlrpcd *ptlrpcds;
 
 struct mutex ptlrpcd_mutex;
-static int ptlrpcd_users = 0;
+static int ptlrpcd_users;
 
 void ptlrpcd_wake(struct ptlrpc_request *req)
 {
This page took 0.029917 seconds and 5 git commands to generate.