netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] selftests/net: update initializer syntax to use c99 designators
@ 2020-07-04 20:45 Tanner Love
  2020-07-05  0:55 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Tanner Love @ 2020-07-04 20:45 UTC (permalink / raw)
  To: netdev; +Cc: davem, Tanner Love, Willem de Bruijn

From: Tanner Love <tannerlove@google.com>

Before, clang version 9 threw errors such as: error:
use of GNU old-style field designator extension [-Werror,-Wgnu-designator]
                { tstamp: true, swtstamp: true }
                  ^~~~~~~
                  .tstamp =
Fix these warnings in tools/testing/selftests/net in the same manner as
commit 121e357ac728 ("selftests/harness: Update named initializer syntax").
N.B. rxtimestamp.c is the only affected file in the directory.

Signed-off-by: Tanner Love <tannerlove@google.com>
Acked-by: Willem de Bruijn <willemb@google.com>
---
 tools/testing/selftests/net/rxtimestamp.c | 30 +++++++++++------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/tools/testing/selftests/net/rxtimestamp.c b/tools/testing/selftests/net/rxtimestamp.c
index c599d371cbbe..221fdece47d4 100644
--- a/tools/testing/selftests/net/rxtimestamp.c
+++ b/tools/testing/selftests/net/rxtimestamp.c
@@ -68,44 +68,44 @@ static struct socket_type socket_types[] = {
 static struct test_case test_cases[] = {
 	{ {}, {} },
 	{
-		{ so_timestamp: 1 },
-		{ tstamp: true }
+		{ .so_timestamp = 1 },
+		{ .tstamp = true }
 	},
 	{
-		{ so_timestampns: 1 },
-		{ tstampns: true }
+		{ .so_timestampns = 1 },
+		{ .tstampns = true }
 	},
 	{
-		{ so_timestamp: 1, so_timestampns: 1 },
-		{ tstampns: true }
+		{ .so_timestamp = 1, .so_timestampns = 1 },
+		{ .tstampns = true }
 	},
 	{
-		{ so_timestamping: SOF_TIMESTAMPING_RX_SOFTWARE },
+		{ .so_timestamping = SOF_TIMESTAMPING_RX_SOFTWARE },
 		{}
 	},
 	{
 		/* Loopback device does not support hw timestamps. */
-		{ so_timestamping: SOF_TIMESTAMPING_RX_HARDWARE },
+		{ .so_timestamping = SOF_TIMESTAMPING_RX_HARDWARE },
 		{}
 	},
 	{
-		{ so_timestamping: SOF_TIMESTAMPING_SOFTWARE },
-		warn_on_fail : true
+		{ .so_timestamping = SOF_TIMESTAMPING_SOFTWARE },
+		.warn_on_fail = true
 	},
 	{
-		{ so_timestamping: SOF_TIMESTAMPING_RX_SOFTWARE
+		{ .so_timestamping = SOF_TIMESTAMPING_RX_SOFTWARE
 			| SOF_TIMESTAMPING_RX_HARDWARE },
 		{}
 	},
 	{
-		{ so_timestamping: SOF_TIMESTAMPING_SOFTWARE
+		{ .so_timestamping = SOF_TIMESTAMPING_SOFTWARE
 			| SOF_TIMESTAMPING_RX_SOFTWARE },
-		{ swtstamp: true }
+		{ .swtstamp = true }
 	},
 	{
-		{ so_timestamp: 1, so_timestamping: SOF_TIMESTAMPING_SOFTWARE
+		{ .so_timestamp = 1, .so_timestamping = SOF_TIMESTAMPING_SOFTWARE
 			| SOF_TIMESTAMPING_RX_SOFTWARE },
-		{ tstamp: true, swtstamp: true }
+		{ .tstamp = true, .swtstamp = true }
 	},
 };
 
-- 
2.27.0.212.ge8ba1cc988-goog


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

* Re: [PATCH net-next] selftests/net: update initializer syntax to use c99 designators
  2020-07-04 20:45 [PATCH net-next] selftests/net: update initializer syntax to use c99 designators Tanner Love
@ 2020-07-05  0:55 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-07-05  0:55 UTC (permalink / raw)
  To: tannerlove.kernel; +Cc: netdev, tannerlove, willemb

From: Tanner Love <tannerlove.kernel@gmail.com>
Date: Sat,  4 Jul 2020 16:45:14 -0400

> From: Tanner Love <tannerlove@google.com>
> 
> Before, clang version 9 threw errors such as: error:
> use of GNU old-style field designator extension [-Werror,-Wgnu-designator]
>                 { tstamp: true, swtstamp: true }
>                   ^~~~~~~
>                   .tstamp =
> Fix these warnings in tools/testing/selftests/net in the same manner as
> commit 121e357ac728 ("selftests/harness: Update named initializer syntax").
> N.B. rxtimestamp.c is the only affected file in the directory.
> 
> Signed-off-by: Tanner Love <tannerlove@google.com>
> Acked-by: Willem de Bruijn <willemb@google.com>

Applied.

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

end of thread, other threads:[~2020-07-05  0:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-04 20:45 [PATCH net-next] selftests/net: update initializer syntax to use c99 designators Tanner Love
2020-07-05  0:55 ` David Miller

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).