All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] samples/bpf: fix warnings in xdp_monitor_user
@ 2017-10-01 21:07 Stephen Hemminger
  2017-10-02  1:35 ` Alexei Starovoitov
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Stephen Hemminger @ 2017-10-01 21:07 UTC (permalink / raw)
  To: ast, daniel; +Cc: netdev, Stephen Hemminger, Stephen Hemminger

Make local functions static to fix

  HOSTCC  samples/bpf/xdp_monitor_user.o
samples/bpf/xdp_monitor_user.c:64:7: warning: no previous prototype for ‘gettime’ [-Wmissing-prototypes]
 __u64 gettime(void)
       ^~~~~~~
samples/bpf/xdp_monitor_user.c:209:6: warning: no previous prototype for ‘print_bpf_prog_info’ [-Wmissing-prototypes]
 void print_bpf_prog_info(void)
      ^~~~~~~~~~~~~~~~~~~
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 samples/bpf/xdp_monitor_user.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/samples/bpf/xdp_monitor_user.c b/samples/bpf/xdp_monitor_user.c
index b51b4f5e3257..c5ab8b776973 100644
--- a/samples/bpf/xdp_monitor_user.c
+++ b/samples/bpf/xdp_monitor_user.c
@@ -61,7 +61,7 @@ static void usage(char *argv[])
 }
 
 #define NANOSEC_PER_SEC 1000000000 /* 10^9 */
-__u64 gettime(void)
+static __u64 gettime(void)
 {
 	struct timespec t;
 	int res;
@@ -206,7 +206,7 @@ static void stats_poll(int interval, bool err_only)
 	}
 }
 
-void print_bpf_prog_info(void)
+static void print_bpf_prog_info(void)
 {
 	int i;
 
-- 
2.11.0

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

* Re: [PATCH net-next] samples/bpf: fix warnings in xdp_monitor_user
  2017-10-01 21:07 [PATCH net-next] samples/bpf: fix warnings in xdp_monitor_user Stephen Hemminger
@ 2017-10-02  1:35 ` Alexei Starovoitov
  2017-10-02  5:43 ` Jesper Dangaard Brouer
  2017-10-02  6:08 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Alexei Starovoitov @ 2017-10-02  1:35 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: ast, daniel, netdev, Stephen Hemminger, Jesper Dangaard Brouer

On Sun, Oct 01, 2017 at 02:07:34PM -0700, Stephen Hemminger wrote:
> Make local functions static to fix
> 
>   HOSTCC  samples/bpf/xdp_monitor_user.o
> samples/bpf/xdp_monitor_user.c:64:7: warning: no previous prototype for ‘gettime’ [-Wmissing-prototypes]
>  __u64 gettime(void)
>        ^~~~~~~
> samples/bpf/xdp_monitor_user.c:209:6: warning: no previous prototype for ‘print_bpf_prog_info’ [-Wmissing-prototypes]
>  void print_bpf_prog_info(void)
>       ^~~~~~~~~~~~~~~~~~~
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

Fixes: 3ffab5460264 ("samples/bpf: xdp_monitor tool based on tracepoints")
Acked-by: Alexei Starovoitov <ast@kernel.org>

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

* Re: [PATCH net-next] samples/bpf: fix warnings in xdp_monitor_user
  2017-10-01 21:07 [PATCH net-next] samples/bpf: fix warnings in xdp_monitor_user Stephen Hemminger
  2017-10-02  1:35 ` Alexei Starovoitov
@ 2017-10-02  5:43 ` Jesper Dangaard Brouer
  2017-10-02  6:08 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Jesper Dangaard Brouer @ 2017-10-02  5:43 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: brouer, ast, daniel, netdev, Stephen Hemminger

On Sun,  1 Oct 2017 14:07:34 -0700
Stephen Hemminger <stephen@networkplumber.org> wrote:

> Make local functions static to fix
> 
>   HOSTCC  samples/bpf/xdp_monitor_user.o
> samples/bpf/xdp_monitor_user.c:64:7: warning: no previous prototype for ‘gettime’ [-Wmissing-prototypes]
>  __u64 gettime(void)
>        ^~~~~~~
> samples/bpf/xdp_monitor_user.c:209:6: warning: no previous prototype for ‘print_bpf_prog_info’ [-Wmissing-prototypes]
>  void print_bpf_prog_info(void)
>       ^~~~~~~~~~~~~~~~~~~
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
>  samples/bpf/xdp_monitor_user.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer

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

* Re: [PATCH net-next] samples/bpf: fix warnings in xdp_monitor_user
  2017-10-01 21:07 [PATCH net-next] samples/bpf: fix warnings in xdp_monitor_user Stephen Hemminger
  2017-10-02  1:35 ` Alexei Starovoitov
  2017-10-02  5:43 ` Jesper Dangaard Brouer
@ 2017-10-02  6:08 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2017-10-02  6:08 UTC (permalink / raw)
  To: stephen; +Cc: ast, daniel, netdev, sthemmin

From: Stephen Hemminger <stephen@networkplumber.org>
Date: Sun,  1 Oct 2017 14:07:34 -0700

> Make local functions static to fix
> 
>   HOSTCC  samples/bpf/xdp_monitor_user.o
> samples/bpf/xdp_monitor_user.c:64:7: warning: no previous prototype for ‘gettime’ [-Wmissing-prototypes]
>  __u64 gettime(void)
>        ^~~~~~~
> samples/bpf/xdp_monitor_user.c:209:6: warning: no previous prototype for ‘print_bpf_prog_info’ [-Wmissing-prototypes]
>  void print_bpf_prog_info(void)
>       ^~~~~~~~~~~~~~~~~~~
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

Applied.

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

end of thread, other threads:[~2017-10-02  6:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-01 21:07 [PATCH net-next] samples/bpf: fix warnings in xdp_monitor_user Stephen Hemminger
2017-10-02  1:35 ` Alexei Starovoitov
2017-10-02  5:43 ` Jesper Dangaard Brouer
2017-10-02  6:08 ` 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.