netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] selftests/net: do_setcpu function not need to have a return value
@ 2024-07-05  8:35 Liu Jing
  0 siblings, 0 replies; 4+ messages in thread
From: Liu Jing @ 2024-07-05  8:35 UTC (permalink / raw)
  To: davem, edumazet, kuba, pabeni, shuah
  Cc: netdev, linux-kselftest, linux-kernel, liujing

in the do_setcpu, this function does not need to have a return value,
which is meaningless

Signed-off-by: Liu Jing <liujing@cmss.chinamobile.com>
---
 tools/testing/selftests/net/msg_zerocopy.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/testing/selftests/net/msg_zerocopy.c b/tools/testing/selftests/net/msg_zerocopy.c
index bdc03a2097e8..0b54f2011449 100644
--- a/tools/testing/selftests/net/msg_zerocopy.c
+++ b/tools/testing/selftests/net/msg_zerocopy.c
@@ -118,7 +118,7 @@ static uint16_t get_ip_csum(const uint16_t *start, int num_words)
 	return ~sum;
 }
 
-static int do_setcpu(int cpu)
+static void do_setcpu(int cpu)
 {
 	cpu_set_t mask;
 
@@ -129,7 +129,6 @@ static int do_setcpu(int cpu)
 	else if (cfg_verbose)
 		fprintf(stderr, "cpu: %u\n", cpu);
 
-	return 0;
 }
 
 static void do_setsockopt(int fd, int level, int optname, int val)
-- 
2.33.0




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

* [PATCH] selftests/net: do_setcpu function not need to have a return value
@ 2024-09-03  9:51 Liu Jing
  2024-09-03 16:33 ` Simon Horman
  2024-09-04 23:39 ` Jakub Kicinski
  0 siblings, 2 replies; 4+ messages in thread
From: Liu Jing @ 2024-09-03  9:51 UTC (permalink / raw)
  To: davem
  Cc: edumazet, kuba, pabeni, shuah, netdev, linux-kselftest,
	linux-kernel, Liu Jing

in the do_setcpu, this function does not need to have a return value,
which is meaningless

Signed-off-by: Liu Jing <liujing@cmss.chinamobile.com>
---
 tools/testing/selftests/net/msg_zerocopy.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/testing/selftests/net/msg_zerocopy.c b/tools/testing/selftests/net/msg_zerocopy.c
index bdc03a2097e8..0b54f2011449 100644
--- a/tools/testing/selftests/net/msg_zerocopy.c
+++ b/tools/testing/selftests/net/msg_zerocopy.c
@@ -118,7 +118,7 @@ static uint16_t get_ip_csum(const uint16_t *start, int num_words)
 	return ~sum;
 }
 
-static int do_setcpu(int cpu)
+static void do_setcpu(int cpu)
 {
 	cpu_set_t mask;
 
@@ -129,7 +129,6 @@ static int do_setcpu(int cpu)
 	else if (cfg_verbose)
 		fprintf(stderr, "cpu: %u\n", cpu);
 
-	return 0;
 }
 
 static void do_setsockopt(int fd, int level, int optname, int val)
-- 
2.33.0




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

* Re: [PATCH] selftests/net: do_setcpu function not need to have a return value
  2024-09-03  9:51 [PATCH] selftests/net: do_setcpu function not need to have a return value Liu Jing
@ 2024-09-03 16:33 ` Simon Horman
  2024-09-04 23:39 ` Jakub Kicinski
  1 sibling, 0 replies; 4+ messages in thread
From: Simon Horman @ 2024-09-03 16:33 UTC (permalink / raw)
  To: Liu Jing
  Cc: davem, edumazet, kuba, pabeni, shuah, netdev, linux-kselftest,
	linux-kernel

On Tue, Sep 03, 2024 at 05:51:11PM +0800, Liu Jing wrote:
> in the do_setcpu, this function does not need to have a return value,
> which is meaningless
> 
> Signed-off-by: Liu Jing <liujing@cmss.chinamobile.com>

Thanks,

I also see that the caller does not check the return value.

Reviewed-by: Simon Horman <horms@kernel.org>

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

* Re: [PATCH] selftests/net: do_setcpu function not need to have a return value
  2024-09-03  9:51 [PATCH] selftests/net: do_setcpu function not need to have a return value Liu Jing
  2024-09-03 16:33 ` Simon Horman
@ 2024-09-04 23:39 ` Jakub Kicinski
  1 sibling, 0 replies; 4+ messages in thread
From: Jakub Kicinski @ 2024-09-04 23:39 UTC (permalink / raw)
  To: Liu Jing
  Cc: davem, edumazet, pabeni, shuah, netdev, linux-kselftest,
	linux-kernel

On Tue,  3 Sep 2024 17:51:11 +0800 Liu Jing wrote:
> in the do_setcpu, this function does not need to have a return value,
> which is meaningless

This test is flaky:
https://netdev.bots.linux.dev/contest.html?executor=vmksft-net-dbg&test=msg-zerocopy-sh
Could you please try to figure out what the problem is and fix it
instead of sending "cleanups"?
-- 
pw-bot: reject

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

end of thread, other threads:[~2024-09-04 23:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-03  9:51 [PATCH] selftests/net: do_setcpu function not need to have a return value Liu Jing
2024-09-03 16:33 ` Simon Horman
2024-09-04 23:39 ` Jakub Kicinski
  -- strict thread matches above, loose matches on Subject: below --
2024-07-05  8:35 Liu Jing

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