From: "Björn Töpel" <bjorn.topel@gmail.com>
To: ast@kernel.org, daniel@iogearbox.net, netdev@vger.kernel.org,
bpf@vger.kernel.org
Cc: "Björn Töpel" <bjorn.topel@intel.com>,
magnus.karlsson@intel.com, jonathan.lemon@gmail.com,
ciara.loftus@intel.com, weqaar.a.janjua@intel.com
Subject: [PATCH bpf-next 12/12] selftests/bpf: avoid useless void *-casts
Date: Fri, 22 Jan 2021 16:47:25 +0100 [thread overview]
Message-ID: <20210122154725.22140-13-bjorn.topel@gmail.com> (raw)
In-Reply-To: <20210122154725.22140-1-bjorn.topel@gmail.com>
From: Björn Töpel <bjorn.topel@intel.com>
There is no need to cast to void * when the argument is void *. Avoid
cluttering of code.
Signed-off-by: Björn Töpel <bjorn.topel@intel.com>
---
tools/testing/selftests/bpf/xdpxceiver.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tools/testing/selftests/bpf/xdpxceiver.c b/tools/testing/selftests/bpf/xdpxceiver.c
index a64e2a929e70..99ea6cf069e6 100644
--- a/tools/testing/selftests/bpf/xdpxceiver.c
+++ b/tools/testing/selftests/bpf/xdpxceiver.c
@@ -416,7 +416,7 @@ static int validate_interfaces(void)
exit_with_error(errno);
targs->idx = i;
- if (pthread_create(&ns_thread, NULL, nsswitchthread, (void *)targs))
+ if (pthread_create(&ns_thread, NULL, nsswitchthread, targs))
exit_with_error(errno);
pthread_join(ns_thread, NULL);
@@ -923,12 +923,12 @@ static void testapp_validate(void)
/*Spawn RX thread */
if (!opt_bidi || (opt_bidi && !bidi_pass)) {
- if (pthread_create(&t0, &attr, worker_testapp_validate, (void *)ifdict[1]))
+ if (pthread_create(&t0, &attr, worker_testapp_validate, ifdict[1]))
exit_with_error(errno);
} else if (opt_bidi && bidi_pass) {
/*switch Tx/Rx vectors */
ifdict[0]->fv.vector = rx;
- if (pthread_create(&t0, &attr, worker_testapp_validate, (void *)ifdict[0]))
+ if (pthread_create(&t0, &attr, worker_testapp_validate, ifdict[0]))
exit_with_error(errno);
}
@@ -943,12 +943,12 @@ static void testapp_validate(void)
/*Spawn TX thread */
if (!opt_bidi || (opt_bidi && !bidi_pass)) {
- if (pthread_create(&t1, &attr, worker_testapp_validate, (void *)ifdict[0]))
+ if (pthread_create(&t1, &attr, worker_testapp_validate, ifdict[0]))
exit_with_error(errno);
} else if (opt_bidi && bidi_pass) {
/*switch Tx/Rx vectors */
ifdict[1]->fv.vector = tx;
- if (pthread_create(&t1, &attr, worker_testapp_validate, (void *)ifdict[1]))
+ if (pthread_create(&t1, &attr, worker_testapp_validate, ifdict[1]))
exit_with_error(errno);
}
--
2.27.0
next prev parent reply other threads:[~2021-01-22 17:27 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-22 15:47 [PATCH bpf-next 00/12] Various cleanups/fixes for AF_XDP selftests Björn Töpel
2021-01-22 15:47 ` [PATCH bpf-next 01/12] selftests/bpf: remove a lot of ifobject casting Björn Töpel
2021-01-22 15:47 ` [PATCH bpf-next 02/12] selftests/bpf: remove unused enums Björn Töpel
2021-01-22 15:47 ` [PATCH bpf-next 03/12] selftests/bpf: fix style warnings Björn Töpel
2021-01-22 15:47 ` [PATCH bpf-next 04/12] selftests/bpf: remove memory leak Björn Töpel
2021-01-22 15:47 ` [PATCH bpf-next 05/12] selftests/bpf: improve readability of xdpxceiver/worker_pkt_validate() Björn Töpel
2021-01-22 15:47 ` [PATCH bpf-next 06/12] selftests/bpf: remove casting by introduce local variable Björn Töpel
2021-01-22 15:47 ` [PATCH bpf-next 07/12] selftests/bpf: change type from void * to struct ifaceconfigobj * Björn Töpel
2021-01-22 15:47 ` [PATCH bpf-next 08/12] selftests/bpf: change type from void * to struct generic_data * Björn Töpel
2021-01-22 15:47 ` [PATCH bpf-next 09/12] selftests/bpf: define local variables at the beginning of a block Björn Töpel
2021-01-22 15:47 ` [PATCH bpf-next 10/12] selftests/bpf: avoid heap allocation Björn Töpel
2021-01-22 15:47 ` [PATCH bpf-next 11/12] selftests/bpf: consistent malloc/calloc usage Björn Töpel
2021-01-22 15:47 ` Björn Töpel [this message]
2021-01-25 23:10 ` [PATCH bpf-next 00/12] Various cleanups/fixes for AF_XDP selftests patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210122154725.22140-13-bjorn.topel@gmail.com \
--to=bjorn.topel@gmail.com \
--cc=ast@kernel.org \
--cc=bjorn.topel@intel.com \
--cc=bpf@vger.kernel.org \
--cc=ciara.loftus@intel.com \
--cc=daniel@iogearbox.net \
--cc=jonathan.lemon@gmail.com \
--cc=magnus.karlsson@intel.com \
--cc=netdev@vger.kernel.org \
--cc=weqaar.a.janjua@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).