Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1211472 > unrolled thread
| Started by | Mike Rapoport <mike.rapoport@gmail.com> |
|---|---|
| First post | 2015-08-22 16:20 +0200 |
| Last post | 2015-09-03 07:40 +0200 |
| Articles | 5 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH 0/5] staging: lustre: fix some trivial checpatck.pl errors Mike Rapoport <mike.rapoport@gmail.com> - 2015-08-22 16:20 +0200
[PATCH 3/5] staging: lustre: fix GLOBAL_INITIALISERS checkpatch.pl errors Mike Rapoport <mike.rapoport@gmail.com> - 2015-08-22 16:20 +0200
[PATCH 4/5] staging: lustre: fix SWITCH_CASE_INDENT_LEVEL checkpatch.pl errors Mike Rapoport <mike.rapoport@gmail.com> - 2015-08-22 16:20 +0200
Re: [PATCH 1/5] staging: lustre: fix whitespace errors reported by checkpatch.pl Greg Kroah-Hartman <greg@kroah.com> - 2015-09-03 02:50 +0200
Re: [PATCH 1/5] staging: lustre: fix whitespace errors reported by checkpatch.pl Greg Kroah-Hartman <greg@kroah.com> - 2015-09-03 07:40 +0200
| From | Mike Rapoport <mike.rapoport@gmail.com> |
|---|---|
| Date | 2015-08-22 16:20 +0200 |
| Subject | [PATCH 0/5] staging: lustre: fix some trivial checpatck.pl errors |
| Message-ID | <q0hOh-4w7-3@gated-at.bofh.it> |
Hi, These patches fix some trivial checkpatch.pl errors, like spacing, identation etc. Mike Rapoport (5): staging: lustre: fix whitespace errors reported by checkpatch.pl staging: lustre: fix CODE_INDENT checkpatch.pl errors staging: lustre: fix GLOBAL_INITIALISERS checkpatch.pl errors staging: lustre: fix SWITCH_CASE_INDENT_LEVEL checkpatch.pl errors staging: lustre: fix OPEN_BRACE checkpatch.pl errors .../staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 6 +- .../lustre/lnet/klnds/socklnd/socklnd_lib.c | 6 +- drivers/staging/lustre/lnet/selftest/conrpc.h | 4 +- drivers/staging/lustre/lnet/selftest/console.c | 16 +-- drivers/staging/lustre/lnet/selftest/selftest.h | 22 +-- drivers/staging/lustre/lustre/include/cl_object.h | 14 +- .../staging/lustre/lustre/include/lprocfs_status.h | 3 +- drivers/staging/lustre/lustre/include/lu_object.h | 16 +-- .../lustre/lustre/include/lustre/lustre_idl.h | 12 +- .../lustre/lustre/include/lustre/lustre_user.h | 7 +- .../staging/lustre/lustre/include/lustre_capa.h | 2 +- .../staging/lustre/lustre/include/lustre_disk.h | 2 +- drivers/staging/lustre/lustre/include/lustre_dlm.h | 6 +- .../lustre/lustre/include/lustre_dlm_flags.h | 152 ++++++++++----------- drivers/staging/lustre/lustre/include/lustre_lib.h | 6 +- drivers/staging/lustre/lustre/include/lustre_net.h | 2 +- drivers/staging/lustre/lustre/include/obd.h | 2 +- .../staging/lustre/lustre/include/obd_support.h | 2 +- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 4 +- drivers/staging/lustre/lustre/libcfs/fail.c | 4 +- .../lustre/lustre/libcfs/linux/linux-tracefile.c | 22 ++- drivers/staging/lustre/lustre/libcfs/tracefile.c | 4 +- drivers/staging/lustre/lustre/llite/file.c | 4 +- .../staging/lustre/lustre/llite/llite_internal.h | 2 +- drivers/staging/lustre/lustre/llite/lproc_llite.c | 2 +- drivers/staging/lustre/lustre/llite/rw.c | 6 +- drivers/staging/lustre/lustre/llite/statahead.c | 4 +- drivers/staging/lustre/lustre/llite/vvp_io.c | 2 +- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 2 +- drivers/staging/lustre/lustre/lov/lov_obd.c | 4 +- drivers/staging/lustre/lustre/obdclass/capa.c | 2 +- drivers/staging/lustre/lustre/obdclass/cl_io.c | 10 +- drivers/staging/lustre/lustre/obdclass/cl_lock.c | 6 +- drivers/staging/lustre/lustre/obdclass/cl_object.c | 5 +- drivers/staging/lustre/lustre/obdclass/class_obd.c | 12 +- drivers/staging/lustre/lustre/obdclass/genops.c | 6 +- drivers/staging/lustre/lustre/obdclass/llog.c | 4 +- .../lustre/lustre/obdclass/lprocfs_counters.c | 2 +- drivers/staging/lustre/lustre/obdclass/lu_object.c | 4 +- .../staging/lustre/lustre/obdclass/obd_config.c | 6 +- drivers/staging/lustre/lustre/osc/osc_request.c | 6 +- .../staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 2 +- 42 files changed, 203 insertions(+), 202 deletions(-) -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Mike Rapoport <mike.rapoport@gmail.com> |
|---|---|
| Date | 2015-08-22 16:20 +0200 |
| Subject | [PATCH 3/5] staging: lustre: fix GLOBAL_INITIALISERS checkpatch.pl errors |
| Message-ID | <q0hOh-4w7-13@gated-at.bofh.it> |
| In reply to | #1211472 |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Mike Rapoport <mike.rapoport@gmail.com> |
|---|---|
| Date | 2015-08-22 16:20 +0200 |
| Subject | [PATCH 4/5] staging: lustre: fix SWITCH_CASE_INDENT_LEVEL checkpatch.pl errors |
| Message-ID | <q0hOi-4w7-15@gated-at.bofh.it> |
| In reply to | #1211472 |
Fix occurencies of the following checkpatch.pl error:
ERROR: switch and case should be at the same indent
Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
---
drivers/staging/lustre/lnet/selftest/selftest.h | 20 ++++++++++----------
.../lustre/lustre/libcfs/linux/linux-tracefile.c | 22 ++++++++++------------
2 files changed, 20 insertions(+), 22 deletions(-)
diff --git a/drivers/staging/lustre/lnet/selftest/selftest.h b/drivers/staging/lustre/lnet/selftest/selftest.h
index dfe3342..160d68c 100644
--- a/drivers/staging/lustre/lnet/selftest/selftest.h
+++ b/drivers/staging/lustre/lnet/selftest/selftest.h
@@ -563,16 +563,16 @@ swi_state2str (int state)
{
#define STATE2STR(x) case x: return #x
switch (state) {
- default:
- LBUG();
- STATE2STR(SWI_STATE_NEWBORN);
- STATE2STR(SWI_STATE_REPLY_SUBMITTED);
- STATE2STR(SWI_STATE_REPLY_SENT);
- STATE2STR(SWI_STATE_REQUEST_SUBMITTED);
- STATE2STR(SWI_STATE_REQUEST_SENT);
- STATE2STR(SWI_STATE_REPLY_RECEIVED);
- STATE2STR(SWI_STATE_BULK_STARTED);
- STATE2STR(SWI_STATE_DONE);
+ default:
+ LBUG();
+ STATE2STR(SWI_STATE_NEWBORN);
+ STATE2STR(SWI_STATE_REPLY_SUBMITTED);
+ STATE2STR(SWI_STATE_REPLY_SENT);
+ STATE2STR(SWI_STATE_REQUEST_SUBMITTED);
+ STATE2STR(SWI_STATE_REQUEST_SENT);
+ STATE2STR(SWI_STATE_REPLY_RECEIVED);
+ STATE2STR(SWI_STATE_BULK_STARTED);
+ STATE2STR(SWI_STATE_DONE);
}
#undef STATE2STR
}
diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c b/drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c
index eb10e3b..87d8449 100644
--- a/drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c
+++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c
@@ -212,12 +212,11 @@ static char *
dbghdr_to_err_string(struct ptldebug_header *hdr)
{
switch (hdr->ph_subsys) {
-
- case S_LND:
- case S_LNET:
- return "LNetError";
- default:
- return "LustreError";
+ case S_LND:
+ case S_LNET:
+ return "LNetError";
+ default:
+ return "LustreError";
}
}
@@ -225,12 +224,11 @@ static char *
dbghdr_to_info_string(struct ptldebug_header *hdr)
{
switch (hdr->ph_subsys) {
-
- case S_LND:
- case S_LNET:
- return "LNet";
- default:
- return "Lustre";
+ case S_LND:
+ case S_LNET:
+ return "LNet";
+ default:
+ return "Lustre";
}
}
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Greg Kroah-Hartman <greg@kroah.com> |
|---|---|
| Date | 2015-09-03 02:50 +0200 |
| Subject | Re: [PATCH 1/5] staging: lustre: fix whitespace errors reported by checkpatch.pl |
| Message-ID | <q4qSZ-4x8-7@gated-at.bofh.it> |
| In reply to | #1211472 |
On Sat, Aug 22, 2015 at 05:17:19PM +0300, Mike Rapoport wrote: > Added/removed spaces and replaced '+1' with '1' in several places to > eliminate SPACING and POINTER_LOCATION errors reported by checkpatch.pl > > Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Does not apply to my tree :( -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Greg Kroah-Hartman <greg@kroah.com> |
|---|---|
| Date | 2015-09-03 07:40 +0200 |
| Subject | Re: [PATCH 1/5] staging: lustre: fix whitespace errors reported by checkpatch.pl |
| Message-ID | <q4vpF-2GW-19@gated-at.bofh.it> |
| In reply to | #1217973 |
On Thu, Sep 03, 2015 at 08:22:55AM +0300, Mike Rapoport wrote: > On Wed, Sep 02, 2015 at 05:48:46PM -0700, Greg Kroah-Hartman wrote: > > On Sat, Aug 22, 2015 at 05:17:19PM +0300, Mike Rapoport wrote: > > > Added/removed spaces and replaced '+1' with '1' in several places to > > > eliminate SPACING and POINTER_LOCATION errors reported by checkpatch.pl > > > > > > Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> > > > > Does not apply to my tree :( > > Rebased against current staging-testing. > > > >From 4f4cdc89b94aec9a72cec4cec171d049f6f65a2a Mon Sep 17 00:00:00 2001 > From: Mike Rapoport <mike.rapoport@gmail.com> > Date: Sat, 22 Aug 2015 17:17:19 +0300 > Subject: [PATCH] staging: lustre: fix whitespace errors reported by > checkpatch.pl Please resend it in a form that doesn't require me to hand-edit it :( -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web