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>
__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,
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);
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)
#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);
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
#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");
* 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.
/* 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
#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);
static struct ptlrpcd *ptlrpcds;
struct mutex ptlrpcd_mutex;
-static int ptlrpcd_users = 0;
+static int ptlrpcd_users;
void ptlrpcd_wake(struct ptlrpc_request *req)
{