mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mike Rapoport <mike.rapoport@gmail.com>
To: Greg Kroah-Hartman <greg@kroah.com>
Cc: Mike Rapoport <mike.rapoport@gmail.com>,
	Andreas Dilger <andreas.dilger@intel.com>,
	Oleg Drokin <oleg.drokin@intel.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 3/5] staging: lustre: fix GLOBAL_INITIALISERS checkpatch.pl errors
Date: Sat, 22 Aug 2015 17:17:21 +0300	[thread overview]
Message-ID: <1440253043-5868-4-git-send-email-mike.rapoport@gmail.com> (raw)
In-Reply-To: <1440253043-5868-1-git-send-email-mike.rapoport@gmail.com>

Fix occurencies of the following checkpatch.pl error:
ERROR: do not initialise globals to 0 or NULL

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
---
 drivers/staging/lustre/lustre/ldlm/ldlm_resource.c        | 4 ++--
 drivers/staging/lustre/lustre/libcfs/fail.c               | 4 ++--
 drivers/staging/lustre/lustre/obdclass/capa.c             | 2 +-
 drivers/staging/lustre/lustre/obdclass/class_obd.c        | 8 ++++----
 drivers/staging/lustre/lustre/obdclass/lprocfs_counters.c | 2 +-
 drivers/staging/lustre/lustre/obdclass/lu_object.c        | 4 ++--
 drivers/staging/lustre/lustre/obdclass/obd_config.c       | 4 ++--
 7 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
index 4bb3173..cc212b9 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
@@ -47,8 +47,8 @@
 
 struct kmem_cache *ldlm_resource_slab, *ldlm_lock_slab;
 
-int ldlm_srv_namespace_nr = 0;
-int ldlm_cli_namespace_nr = 0;
+int ldlm_srv_namespace_nr;
+int ldlm_cli_namespace_nr;
 
 struct mutex ldlm_srv_namespace_lock;
 LIST_HEAD(ldlm_srv_namespace_list);
diff --git a/drivers/staging/lustre/lustre/libcfs/fail.c b/drivers/staging/lustre/lustre/libcfs/fail.c
index 42d615f..d39fece 100644
--- a/drivers/staging/lustre/lustre/libcfs/fail.c
+++ b/drivers/staging/lustre/lustre/libcfs/fail.c
@@ -35,10 +35,10 @@
 
 #include "../../include/linux/libcfs/libcfs.h"
 
-unsigned long cfs_fail_loc = 0;
+unsigned long cfs_fail_loc;
 EXPORT_SYMBOL(cfs_fail_loc);
 
-unsigned int cfs_fail_val = 0;
+unsigned int cfs_fail_val;
 EXPORT_SYMBOL(cfs_fail_val);
 
 DECLARE_WAIT_QUEUE_HEAD(cfs_race_waitq);
diff --git a/drivers/staging/lustre/lustre/obdclass/capa.c b/drivers/staging/lustre/lustre/obdclass/capa.c
index d8d1a66..99af017 100644
--- a/drivers/staging/lustre/lustre/obdclass/capa.c
+++ b/drivers/staging/lustre/lustre/obdclass/capa.c
@@ -58,7 +58,7 @@
 #define NR_CAPAHASH 32
 #define CAPA_HASH_SIZE 3000	      /* for MDS & OSS */
 
-struct kmem_cache *capa_cachep = NULL;
+struct kmem_cache *capa_cachep;
 
 /* lock for capa hash/capa_list/fo_capa_keys */
 DEFINE_SPINLOCK(capa_lock);
diff --git a/drivers/staging/lustre/lustre/obdclass/class_obd.c b/drivers/staging/lustre/lustre/obdclass/class_obd.c
index 130c4e3..b151154 100644
--- a/drivers/staging/lustre/lustre/obdclass/class_obd.c
+++ b/drivers/staging/lustre/lustre/obdclass/class_obd.c
@@ -53,9 +53,9 @@ EXPORT_SYMBOL(obd_devs);
 struct list_head obd_types;
 DEFINE_RWLOCK(obd_dev_lock);
 
-__u64 obd_max_pages = 0;
+__u64 obd_max_pages;
 EXPORT_SYMBOL(obd_max_pages);
-__u64 obd_max_alloc = 0;
+__u64 obd_max_alloc;
 EXPORT_SYMBOL(obd_max_alloc);
 __u64 obd_alloc;
 EXPORT_SYMBOL(obd_alloc);
@@ -64,7 +64,7 @@ EXPORT_SYMBOL(obd_pages);
 static DEFINE_SPINLOCK(obd_updatemax_lock);
 
 /* The following are visible and mutable through /proc/sys/lustre/. */
-unsigned int obd_alloc_fail_rate = 0;
+unsigned int obd_alloc_fail_rate;
 EXPORT_SYMBOL(obd_alloc_fail_rate);
 unsigned int obd_debug_peer_on_timeout;
 EXPORT_SYMBOL(obd_debug_peer_on_timeout);
@@ -81,7 +81,7 @@ EXPORT_SYMBOL(obd_timeout);
 unsigned int obd_timeout_set;
 EXPORT_SYMBOL(obd_timeout_set);
 /* Adaptive timeout defs here instead of ptlrpc module for /proc/sys/ access */
-unsigned int at_min = 0;
+unsigned int at_min;
 EXPORT_SYMBOL(at_min);
 unsigned int at_max = 600;
 EXPORT_SYMBOL(at_max);
diff --git a/drivers/staging/lustre/lustre/obdclass/lprocfs_counters.c b/drivers/staging/lustre/lustre/obdclass/lprocfs_counters.c
index c49dfe5..1f0004c 100644
--- a/drivers/staging/lustre/lustre/obdclass/lprocfs_counters.c
+++ b/drivers/staging/lustre/lustre/obdclass/lprocfs_counters.c
@@ -41,7 +41,7 @@
 #include "../include/lprocfs_status.h"
 #include "../include/obd_support.h"
 
-struct lprocfs_stats *obd_memory = NULL;
+struct lprocfs_stats *obd_memory;
 EXPORT_SYMBOL(obd_memory);
 
 void lprocfs_counter_add(struct lprocfs_stats *stats, int idx, long amount)
diff --git a/drivers/staging/lustre/lustre/obdclass/lu_object.c b/drivers/staging/lustre/lustre/obdclass/lu_object.c
index 8e47232..55d4523 100644
--- a/drivers/staging/lustre/lustre/obdclass/lu_object.c
+++ b/drivers/staging/lustre/lustre/obdclass/lu_object.c
@@ -1689,8 +1689,8 @@ EXPORT_SYMBOL(lu_context_refill);
  * predefined when the lu_device type are registered, during the module probe
  * phase.
  */
-__u32 lu_context_tags_default = 0;
-__u32 lu_session_tags_default = 0;
+__u32 lu_context_tags_default;
+__u32 lu_session_tags_default;
 
 void lu_context_tags_update(__u32 tags)
 {
diff --git a/drivers/staging/lustre/lustre/obdclass/obd_config.c b/drivers/staging/lustre/lustre/obdclass/obd_config.c
index 953e4c8..d399cae 100644
--- a/drivers/staging/lustre/lustre/obdclass/obd_config.c
+++ b/drivers/staging/lustre/lustre/obdclass/obd_config.c
@@ -931,8 +931,8 @@ static int class_set_global(char *ptr, int val, struct lustre_cfg *lcfg)
 
 /* We can't call ll_process_config or lquota_process_config directly because
  * it lives in a module that must be loaded after this one. */
-static int (*client_process_config)(struct lustre_cfg *lcfg) = NULL;
-static int (*quota_process_config)(struct lustre_cfg *lcfg) = NULL;
+static int (*client_process_config)(struct lustre_cfg *lcfg);
+static int (*quota_process_config)(struct lustre_cfg *lcfg);
 
 void lustre_register_client_process_config(int (*cpc)(struct lustre_cfg *lcfg))
 {
-- 
2.1.0


  parent reply	other threads:[~2015-08-22 14:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-22 14:17 [PATCH 0/5] staging: lustre: fix some trivial checpatck.pl errors Mike Rapoport
2015-08-22 14:17 ` [PATCH 1/5] staging: lustre: fix whitespace errors reported by checkpatch.pl Mike Rapoport
2015-09-03  0:48   ` Greg Kroah-Hartman
2015-09-03  5:22     ` Mike Rapoport
2015-09-03  5:37       ` Greg Kroah-Hartman
2015-09-03  8:49         ` [PATCH] " Mike Rapoport
2015-08-22 14:17 ` [PATCH 2/5] staging: lustre: fix CODE_INDENT checkpatch.pl errors Mike Rapoport
2015-08-22 14:17 ` Mike Rapoport [this message]
2015-08-22 14:17 ` [PATCH 4/5] staging: lustre: fix SWITCH_CASE_INDENT_LEVEL " Mike Rapoport
2015-08-22 14:17 ` [PATCH 5/5] staging: lustre: fix OPEN_BRACE " Mike Rapoport

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1440253043-5868-4-git-send-email-mike.rapoport@gmail.com \
    --to=mike.rapoport@gmail.com \
    --cc=andreas.dilger@intel.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg.drokin@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®