All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next] selftests/bpf: initialize duration in xdp_noinline.c
@ 2020-10-01 22:54 Stanislav Fomichev
  2020-10-01 23:22 ` Martin KaFai Lau
  2020-10-02 14:50 ` patchwork-bot+bpf
  0 siblings, 2 replies; 3+ messages in thread
From: Stanislav Fomichev @ 2020-10-01 22:54 UTC (permalink / raw)
  To: netdev, bpf; +Cc: davem, ast, daniel, Stanislav Fomichev

Fixes clang error:
tools/testing/selftests/bpf/prog_tests/xdp_noinline.c:35:6: error: variable 'duration' is uninitialized when used here [-Werror,-Wuninitialized]
        if (CHECK(!skel, "skel_open_and_load", "failed\n"))
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Stanislav Fomichev <sdf@google.com>
---
 tools/testing/selftests/bpf/prog_tests/xdp_noinline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/bpf/prog_tests/xdp_noinline.c b/tools/testing/selftests/bpf/prog_tests/xdp_noinline.c
index a1f06424cf83..0281095de266 100644
--- a/tools/testing/selftests/bpf/prog_tests/xdp_noinline.c
+++ b/tools/testing/selftests/bpf/prog_tests/xdp_noinline.c
@@ -25,7 +25,7 @@ void test_xdp_noinline(void)
 		__u8 flags;
 	} real_def = {.dst = MAGIC_VAL};
 	__u32 ch_key = 11, real_num = 3;
-	__u32 duration, retval, size;
+	__u32 duration = 0, retval, size;
 	int err, i;
 	__u64 bytes = 0, pkts = 0;
 	char buf[128];
-- 
2.28.0.709.gb0816b6eb0-goog


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

* Re: [PATCH bpf-next] selftests/bpf: initialize duration in xdp_noinline.c
  2020-10-01 22:54 [PATCH bpf-next] selftests/bpf: initialize duration in xdp_noinline.c Stanislav Fomichev
@ 2020-10-01 23:22 ` Martin KaFai Lau
  2020-10-02 14:50 ` patchwork-bot+bpf
  1 sibling, 0 replies; 3+ messages in thread
From: Martin KaFai Lau @ 2020-10-01 23:22 UTC (permalink / raw)
  To: Stanislav Fomichev; +Cc: netdev, bpf, davem, ast, daniel

On Thu, Oct 01, 2020 at 03:54:40PM -0700, Stanislav Fomichev wrote:
> Fixes clang error:
> tools/testing/selftests/bpf/prog_tests/xdp_noinline.c:35:6: error: variable 'duration' is uninitialized when used here [-Werror,-Wuninitialized]
>         if (CHECK(!skel, "skel_open_and_load", "failed\n"))
>             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Signed-off-by: Stanislav Fomichev <sdf@google.com>
> ---
>  tools/testing/selftests/bpf/prog_tests/xdp_noinline.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/bpf/prog_tests/xdp_noinline.c b/tools/testing/selftests/bpf/prog_tests/xdp_noinline.c
> index a1f06424cf83..0281095de266 100644
> --- a/tools/testing/selftests/bpf/prog_tests/xdp_noinline.c
> +++ b/tools/testing/selftests/bpf/prog_tests/xdp_noinline.c
> @@ -25,7 +25,7 @@ void test_xdp_noinline(void)
>  		__u8 flags;
>  	} real_def = {.dst = MAGIC_VAL};
>  	__u32 ch_key = 11, real_num = 3;
> -	__u32 duration, retval, size;
> +	__u32 duration = 0, retval, size;
Acked-by: Martin KaFai Lau <kafai@fb.com>

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

* Re: [PATCH bpf-next] selftests/bpf: initialize duration in xdp_noinline.c
  2020-10-01 22:54 [PATCH bpf-next] selftests/bpf: initialize duration in xdp_noinline.c Stanislav Fomichev
  2020-10-01 23:22 ` Martin KaFai Lau
@ 2020-10-02 14:50 ` patchwork-bot+bpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bpf @ 2020-10-02 14:50 UTC (permalink / raw)
  To: Stanislav Fomichev; +Cc: bpf

Hello:

This patch was applied to bpf/bpf-next.git (refs/heads/master):

On Thu,  1 Oct 2020 15:54:40 -0700 you wrote:
> Fixes clang error:
> tools/testing/selftests/bpf/prog_tests/xdp_noinline.c:35:6: error: variable 'duration' is uninitialized when used here [-Werror,-Wuninitialized]
>         if (CHECK(!skel, "skel_open_and_load", "failed\n"))
>             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Signed-off-by: Stanislav Fomichev <sdf@google.com>
> 
> [...]

Here is the summary with links:
  - [bpf-next] selftests/bpf: initialize duration in xdp_noinline.c
    https://git.kernel.org/bpf/bpf-next/c/cffcdbff70a3

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2020-10-02 14:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-01 22:54 [PATCH bpf-next] selftests/bpf: initialize duration in xdp_noinline.c Stanislav Fomichev
2020-10-01 23:22 ` Martin KaFai Lau
2020-10-02 14:50 ` patchwork-bot+bpf

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.