Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1247697
| From | Sergey Senozhatsky <sergey.senozhatsky@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 7/8] tools/vm/slabinfo: cosmetic globals cleanup |
| Date | 2015-10-15 13:20 +0200 |
| Message-ID | <qjOJI-4LQ-31@gated-at.bofh.it> (permalink) |
| References | <qjOJH-4LQ-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
checkpatch.pl complains about globals being explicitly zeroed
out: "ERROR: do not initialise globals to 0 or NULL".
New globals, introduced in this patch set, have no explicit 0
initialization; clean up the old ones to make it less hairy.
Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
---
tools/vm/slabinfo.c | 54 ++++++++++++++++++++++++++---------------------------
1 file changed, 27 insertions(+), 27 deletions(-)
diff --git a/tools/vm/slabinfo.c b/tools/vm/slabinfo.c
index 60beb91..86e698d0 100644
--- a/tools/vm/slabinfo.c
+++ b/tools/vm/slabinfo.c
@@ -53,43 +53,43 @@ struct aliasinfo {
struct slabinfo *slab;
} aliasinfo[MAX_ALIASES];
-int slabs = 0;
-int actual_slabs = 0;
-int aliases = 0;
-int alias_targets = 0;
-int highest_node = 0;
+int slabs;
+int actual_slabs;
+int aliases;
+int alias_targets;
+int highest_node;
char buffer[4096];
-int show_empty = 0;
-int show_report = 0;
-int show_alias = 0;
-int show_slab = 0;
+int show_empty;
+int show_report;
+int show_alias;
+int show_slab;
int skip_zero = 1;
-int show_numa = 0;
-int show_track = 0;
-int show_first_alias = 0;
-int validate = 0;
-int shrink = 0;
-int show_inverted = 0;
-int show_single_ref = 0;
-int show_totals = 0;
-int sort_size = 0;
-int sort_active = 0;
-int set_debug = 0;
-int show_ops = 0;
-int show_activity = 0;
+int show_numa;
+int show_track;
+int show_first_alias;
+int validate;
+int shrink;
+int show_inverted;
+int show_single_ref;
+int show_totals;
+int sort_size;
+int sort_active;
+int set_debug;
+int show_ops;
+int show_activity;
int output_lines = -1;
int sort_loss;
int extended_totals;
int show_bytes;
/* Debug options */
-int sanity = 0;
-int redzone = 0;
-int poison = 0;
-int tracking = 0;
-int tracing = 0;
+int sanity;
+int redzone;
+int poison;
+int tracking;
+int tracing;
int page_size;
--
2.6.1.134.g4b1fd35
--
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/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC][PATCH 0/8] introduce slabinfo extended mode Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2015-10-15 13:20 +0200
[PATCH 7/8] tools/vm/slabinfo: cosmetic globals cleanup Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2015-10-15 13:20 +0200
Re: [RFC][PATCH 0/8] introduce slabinfo extended mode Andrew Morton <akpm@linux-foundation.org> - 2015-10-17 00:40 +0200
Re: [RFC][PATCH 0/8] introduce slabinfo extended mode Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2015-10-17 04:30 +0200
csiph-web