All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bpf_dbg: do not initialise statics to 0
@ 2016-02-04  9:36 Wei Tang
  2016-02-11  9:25 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Tang @ 2016-02-04  9:36 UTC (permalink / raw)
  To: davem; +Cc: netdev, Wei Tang

This patch fixes the checkpatch.pl error to bpf_dbg.c:

ERROR: do not initialise statics to 0

Signed-off-by: Wei Tang <tangwei@cmss.chinamobile.com>
---
 tools/net/bpf_dbg.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/tools/net/bpf_dbg.c b/tools/net/bpf_dbg.c
index 9a287be..4f254bc 100644
--- a/tools/net/bpf_dbg.c
+++ b/tools/net/bpf_dbg.c
@@ -129,16 +129,16 @@ struct bpf_regs {
 };
 
 static struct sock_filter bpf_image[BPF_MAXINSNS + 1];
-static unsigned int bpf_prog_len = 0;
+static unsigned int bpf_prog_len;
 
 static int bpf_breakpoints[64];
 static struct bpf_regs bpf_regs[BPF_MAXINSNS + 1];
 static struct bpf_regs bpf_curr;
-static unsigned int bpf_regs_len = 0;
+static unsigned int bpf_regs_len;
 
 static int pcap_fd = -1;
-static unsigned int pcap_packet = 0;
-static size_t pcap_map_size = 0;
+static unsigned int pcap_packet;
+static size_t pcap_map_size;
 static char *pcap_ptr_va_start, *pcap_ptr_va_curr;
 
 static const char * const op_table[] = {
@@ -1172,7 +1172,7 @@ static int cmd_breakpoint(char *subcmd)
 
 static int cmd_run(char *num)
 {
-	static uint32_t pass = 0, fail = 0;
+	static uint32_t pass, fail;
 	bool has_limit = true;
 	int pkts = 0, i = 0;
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] bpf_dbg: do not initialise statics to 0
  2016-02-04  9:36 [PATCH] bpf_dbg: do not initialise statics to 0 Wei Tang
@ 2016-02-11  9:25 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-02-11  9:25 UTC (permalink / raw)
  To: tangwei; +Cc: netdev

From: Wei Tang <tangwei@cmss.chinamobile.com>
Date: Thu,  4 Feb 2016 17:36:23 +0800

> This patch fixes the checkpatch.pl error to bpf_dbg.c:
> 
> ERROR: do not initialise statics to 0
> 
> Signed-off-by: Wei Tang <tangwei@cmss.chinamobile.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-11  9:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-04  9:36 [PATCH] bpf_dbg: do not initialise statics to 0 Wei Tang
2016-02-11  9:25 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.