netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net v2] selftest: af_unix: Fix kselftest compilation warnings
@ 2024-08-12 19:11 Abhinav Jain
  2024-08-12 20:13 ` Kuniyuki Iwashima
  2024-08-14  1:21 ` Jakub Kicinski
  0 siblings, 2 replies; 5+ messages in thread
From: Abhinav Jain @ 2024-08-12 19:11 UTC (permalink / raw)
  To: davem, edumazet, kuba, pabeni, shuah, netdev, linux-kselftest,
	linux-kernel
  Cc: skhan, javier.carrasco.cruz, Abhinav Jain

Change the parameter expected_buf from (const void *) to (const char *)
in the function __recvpair() as per the feedback in v1.
Add Fixes tag as per feedback in v1.

This change fixes the below warnings during test compilation:

```
In file included from msg_oob.c:14:
msg_oob.c: In function ‘__recvpair’:

../../kselftest_harness.h:106:40: warning: format ‘%s’ expects argument
of type ‘char *’,but argument 6 has type ‘const void *’ [-Wformat=]

../../kselftest_harness.h:101:17: note: in expansion of macro ‘__TH_LOG’
msg_oob.c:235:17: note: in expansion of macro ‘TH_LOG’

../../kselftest_harness.h:106:40: warning: format ‘%s’ expects argument
of type ‘char *’,but argument 6 has type ‘const void *’ [-Wformat=]

../../kselftest_harness.h:101:17: note: in expansion of macro ‘__TH_LOG’
msg_oob.c:259:25: note: in expansion of macro ‘TH_LOG’
```

v1:
lore.kernel.org/netdev/20240810134037.669765-1-jain.abhinav177@gmail.com

Fixes: d098d77232c3 ("selftest: af_unix: Add msg_oob.c.")
Signed-off-by: Abhinav Jain <jain.abhinav177@gmail.com>
---
 tools/testing/selftests/net/af_unix/msg_oob.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/net/af_unix/msg_oob.c b/tools/testing/selftests/net/af_unix/msg_oob.c
index 16d0c172eaeb..535eb2c3d7d1 100644
--- a/tools/testing/selftests/net/af_unix/msg_oob.c
+++ b/tools/testing/selftests/net/af_unix/msg_oob.c
@@ -209,7 +209,7 @@ static void __sendpair(struct __test_metadata *_metadata,
 
 static void __recvpair(struct __test_metadata *_metadata,
 		       FIXTURE_DATA(msg_oob) *self,
-		       const void *expected_buf, int expected_len,
+		       const char *expected_buf, int expected_len,
 		       int buf_len, int flags)
 {
 	int i, ret[2], recv_errno[2], expected_errno = 0;
-- 
2.34.1


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

* Re: [PATCH net v2] selftest: af_unix: Fix kselftest compilation warnings
  2024-08-12 19:11 [PATCH net v2] selftest: af_unix: Fix kselftest compilation warnings Abhinav Jain
@ 2024-08-12 20:13 ` Kuniyuki Iwashima
  2024-08-14  1:21 ` Jakub Kicinski
  1 sibling, 0 replies; 5+ messages in thread
From: Kuniyuki Iwashima @ 2024-08-12 20:13 UTC (permalink / raw)
  To: jain.abhinav177
  Cc: davem, edumazet, javier.carrasco.cruz, kuba, linux-kernel,
	linux-kselftest, netdev, pabeni, shuah, skhan, kuniyu

From: Abhinav Jain <jain.abhinav177@gmail.com>
Date: Tue, 13 Aug 2024 00:41:22 +0530
> Change the parameter expected_buf from (const void *) to (const char *)
> in the function __recvpair() as per the feedback in v1.
> Add Fixes tag as per feedback in v1.
> 
> This change fixes the below warnings during test compilation:
> 
> ```
> In file included from msg_oob.c:14:
> msg_oob.c: In function ‘__recvpair’:
> 
> ../../kselftest_harness.h:106:40: warning: format ‘%s’ expects argument
> of type ‘char *’,but argument 6 has type ‘const void *’ [-Wformat=]
> 
> ../../kselftest_harness.h:101:17: note: in expansion of macro ‘__TH_LOG’
> msg_oob.c:235:17: note: in expansion of macro ‘TH_LOG’
> 
> ../../kselftest_harness.h:106:40: warning: format ‘%s’ expects argument
> of type ‘char *’,but argument 6 has type ‘const void *’ [-Wformat=]
> 
> ../../kselftest_harness.h:101:17: note: in expansion of macro ‘__TH_LOG’
> msg_oob.c:259:25: note: in expansion of macro ‘TH_LOG’
> ```
> 
> v1:
> lore.kernel.org/netdev/20240810134037.669765-1-jain.abhinav177@gmail.com
> 
> Fixes: d098d77232c3 ("selftest: af_unix: Add msg_oob.c.")
> Signed-off-by: Abhinav Jain <jain.abhinav177@gmail.com>

No need to respin, but a minor comment below for the future patches.

Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>

> ---

You can put changelog between revisions after "---" so that it will
disappear during merge.

And, it would be easy to jump to v1 if it has https:// .

Here's a nice example:

https://docs.kernel.org/process/maintainer-netdev.html#changes-requested

Thanks!

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

* Re: [PATCH net v2] selftest: af_unix: Fix kselftest compilation warnings
  2024-08-12 19:11 [PATCH net v2] selftest: af_unix: Fix kselftest compilation warnings Abhinav Jain
  2024-08-12 20:13 ` Kuniyuki Iwashima
@ 2024-08-14  1:21 ` Jakub Kicinski
  2024-08-14  8:10   ` Abhinav Jain
  1 sibling, 1 reply; 5+ messages in thread
From: Jakub Kicinski @ 2024-08-14  1:21 UTC (permalink / raw)
  To: Abhinav Jain
  Cc: davem, edumazet, pabeni, shuah, netdev, linux-kselftest,
	linux-kernel, skhan, javier.carrasco.cruz

On Tue, 13 Aug 2024 00:41:22 +0530 Abhinav Jain wrote:
> Change the parameter expected_buf from (const void *) to (const char *)
> in the function __recvpair() as per the feedback in v1.
> Add Fixes tag as per feedback in v1.
> 
> This change fixes the below warnings during test compilation:
> 
> ```
> In file included from msg_oob.c:14:
> msg_oob.c: In function ‘__recvpair’:
> 
> ../../kselftest_harness.h:106:40: warning: format ‘%s’ expects argument
> of type ‘char *’,but argument 6 has type ‘const void *’ [-Wformat=]
> 
> ../../kselftest_harness.h:101:17: note: in expansion of macro ‘__TH_LOG’
> msg_oob.c:235:17: note: in expansion of macro ‘TH_LOG’
> 
> ../../kselftest_harness.h:106:40: warning: format ‘%s’ expects argument
> of type ‘char *’,but argument 6 has type ‘const void *’ [-Wformat=]
> 
> ../../kselftest_harness.h:101:17: note: in expansion of macro ‘__TH_LOG’
> msg_oob.c:259:25: note: in expansion of macro ‘TH_LOG’
> ```
> 
> v1:
> lore.kernel.org/netdev/20240810134037.669765-1-jain.abhinav177@gmail.com
> 
> Fixes: d098d77232c3 ("selftest: af_unix: Add msg_oob.c.")
> Signed-off-by: Abhinav Jain <jain.abhinav177@gmail.com>

Some patchwork malfunction, the patch didn't get registered :(
Could you resend?

Please keep Kuniyuki's review tag and address his feedback.

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

* Re: [PATCH net v2] selftest: af_unix: Fix kselftest compilation warnings
  2024-08-14  1:21 ` Jakub Kicinski
@ 2024-08-14  8:10   ` Abhinav Jain
  2024-08-14 14:43     ` Jakub Kicinski
  0 siblings, 1 reply; 5+ messages in thread
From: Abhinav Jain @ 2024-08-14  8:10 UTC (permalink / raw)
  To: kuba
  Cc: davem, edumazet, jain.abhinav177, javier.carrasco.cruz,
	linux-kernel, linux-kselftest, netdev, pabeni, shuah, skhan

On Tue, 13 Aug 2024 18:21:06 -0700, Jakub Kicinski wrote:
> Some patchwork malfunction, the patch didn't get registered :(
> Could you resend?
>
> Please keep Kuniyuki's review tag and address his feedback.

Sure. I have submitted v3 keeping the above in mind, please review:
https://lore.kernel.org/all/20240814080743.1156166-1-jain.abhinav177@gmail.com/

Also, @Jakub, please kindly check this and revert (another patch on which you
have helped a lot already, need one small input and I can send the next version):
https://lore.kernel.org/all/20240810175509.404094-1-jain.abhinav177@gmail.com/

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

* Re: [PATCH net v2] selftest: af_unix: Fix kselftest compilation warnings
  2024-08-14  8:10   ` Abhinav Jain
@ 2024-08-14 14:43     ` Jakub Kicinski
  0 siblings, 0 replies; 5+ messages in thread
From: Jakub Kicinski @ 2024-08-14 14:43 UTC (permalink / raw)
  To: Abhinav Jain
  Cc: davem, edumazet, javier.carrasco.cruz, linux-kernel,
	linux-kselftest, netdev, pabeni, shuah, skhan

On Wed, 14 Aug 2024 13:40:54 +0530 Abhinav Jain wrote:
> Also, @Jakub, please kindly check this and revert (another patch on which you
> have helped a lot already, need one small input and I can send the next version):
> https://lore.kernel.org/all/20240810175509.404094-1-jain.abhinav177@gmail.com/

I read the questions and I don't have an immediate answer.
Please do your best, and we'll review the next version on the list.
Unfortunately there isn't enough hours in the day to help everyone 
I'd like to help.

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

end of thread, other threads:[~2024-08-14 14:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-12 19:11 [PATCH net v2] selftest: af_unix: Fix kselftest compilation warnings Abhinav Jain
2024-08-12 20:13 ` Kuniyuki Iwashima
2024-08-14  1:21 ` Jakub Kicinski
2024-08-14  8:10   ` Abhinav Jain
2024-08-14 14:43     ` Jakub Kicinski

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