* [PATCH] selftests/filesystems: remove the unused list_del()
2026-11-03 16:54 [PATCH] selftests/fs/mount-notify: fix the indentation in the fsmount test Sasha Levin
@ 2026-11-03 16:54 ` Sasha Levin
2026-11-05 22:04 ` (subset) " Christian Brauner
2026-11-03 16:54 ` [PATCH] selftests/statmount: initialize the byte written to the child Sasha Levin
` (4 subsequent siblings)
5 siblings, 1 reply; 16+ messages in thread
From: Sasha Levin @ 2026-11-03 16:54 UTC (permalink / raw)
To: Christian Brauner
Cc: Sasha Levin, Shuah Khan, Nathan Chancellor, linux-fsdevel,
linux-kselftest, llvm, linux-kernel
Nothing uses list_del() in utils.c, and clang warns about it in each
test that builds utils.c with -Wall:
../utils.c:106:20: warning: unused function 'list_del' [-Wunused-function]
Remove it.
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
Found with clang 21; KernelCI's clang builds show the same warning.
tools/testing/selftests/filesystems/utils.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/tools/testing/selftests/filesystems/utils.c b/tools/testing/selftests/filesystems/utils.c
index d73d7d8171db6..4321f1a552587 100644
--- a/tools/testing/selftests/filesystems/utils.c
+++ b/tools/testing/selftests/filesystems/utils.c
@@ -103,16 +103,6 @@ static inline void list_add_tail(struct list *head, struct list *list)
__list_add(list, head->prev, head);
}
-static inline void list_del(struct list *list)
-{
- struct list *next, *prev;
-
- next = list->next;
- prev = list->prev;
- next->prev = prev;
- prev->next = next;
-}
-
static ssize_t read_nointr(int fd, void *buf, size_t count)
{
ssize_t ret;
--
2.53.0
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: (subset) [PATCH] selftests/filesystems: remove the unused list_del()
2026-11-03 16:54 ` [PATCH] selftests/filesystems: remove the unused list_del() Sasha Levin
@ 2026-11-05 22:04 ` Christian Brauner
0 siblings, 0 replies; 16+ messages in thread
From: Christian Brauner @ 2026-11-05 22:04 UTC (permalink / raw)
To: Sasha Levin
Cc: Shuah Khan, Nathan Chancellor, linux-fsdevel, linux-kselftest,
llvm, linux-kernel
On Tue, 03 Nov 2026 11:54:15 -0500, Sasha Levin wrote:
> Nothing uses list_del() in utils.c, and clang warns about it in each
> test that builds utils.c with -Wall:
>
> ../utils.c:106:20: warning: unused function 'list_del' [-Wunused-function]
>
> Remove it.
>
> [...]
Applied to the vfs-7.5.misc branch of the vfs/vfs.git tree.
Patches in the vfs-7.5.misc branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs-7.5.misc
[1/1] selftests/filesystems: remove the unused list_del()
https://git.kernel.org/vfs/vfs/c/65c9cbad74a7
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH] selftests/statmount: initialize the byte written to the child
2026-11-03 16:54 [PATCH] selftests/fs/mount-notify: fix the indentation in the fsmount test Sasha Levin
2026-11-03 16:54 ` [PATCH] selftests/filesystems: remove the unused list_del() Sasha Levin
@ 2026-11-03 16:54 ` Sasha Levin
2026-11-05 22:04 ` (subset) " Christian Brauner
2026-11-03 16:54 ` [PATCH] selftests/namespaces: initialize the byte the children write Sasha Levin
` (3 subsequent siblings)
5 siblings, 1 reply; 16+ messages in thread
From: Sasha Levin @ 2026-11-03 16:54 UTC (permalink / raw)
To: Christian Brauner
Cc: Sasha Levin, Shuah Khan, Nathan Chancellor, linux-fsdevel,
linux-kselftest, llvm, linux-kernel
test_listmount_ns() writes pval to the child only to let it exit, but
never sets it, and clang 21 warns:
statmount_test_ns.c:334:35: warning: variable 'pval' is uninitialized when passed as a const pointer argument here [-Wuninitialized-const-pointer]
Initialize it to 0.
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
Found with clang 21; KernelCI's clang builds show the same warning.
.../testing/selftests/filesystems/statmount/statmount_test_ns.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/filesystems/statmount/statmount_test_ns.c b/tools/testing/selftests/filesystems/statmount/statmount_test_ns.c
index e500905e4c078..e7261d4f3be4e 100644
--- a/tools/testing/selftests/filesystems/statmount/statmount_test_ns.c
+++ b/tools/testing/selftests/filesystems/statmount/statmount_test_ns.c
@@ -275,7 +275,7 @@ static int validate_external_listmount(pid_t pid, uint64_t child_nr_mounts)
static void test_listmount_ns(void)
{
uint64_t nr_mounts;
- char pval;
+ char pval = 0;
int child_ready_pipe[2];
int parent_ready_pipe[2];
pid_t pid;
--
2.53.0
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: (subset) [PATCH] selftests/statmount: initialize the byte written to the child
2026-11-03 16:54 ` [PATCH] selftests/statmount: initialize the byte written to the child Sasha Levin
@ 2026-11-05 22:04 ` Christian Brauner
0 siblings, 0 replies; 16+ messages in thread
From: Christian Brauner @ 2026-11-05 22:04 UTC (permalink / raw)
To: Sasha Levin
Cc: Shuah Khan, Nathan Chancellor, linux-fsdevel, linux-kselftest,
llvm, linux-kernel
On Tue, 03 Nov 2026 11:54:16 -0500, Sasha Levin wrote:
> test_listmount_ns() writes pval to the child only to let it exit, but
> never sets it, and clang 21 warns:
>
> statmount_test_ns.c:334:35: warning: variable 'pval' is uninitialized when passed as a const pointer argument here [-Wuninitialized-const-pointer]
>
> Initialize it to 0.
>
> [...]
Applied to the vfs-7.5.misc branch of the vfs/vfs.git tree.
Patches in the vfs-7.5.misc branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs-7.5.misc
[1/1] selftests/statmount: initialize the byte written to the child
https://git.kernel.org/vfs/vfs/c/678e669241c8
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH] selftests/namespaces: initialize the byte the children write
2026-11-03 16:54 [PATCH] selftests/fs/mount-notify: fix the indentation in the fsmount test Sasha Levin
2026-11-03 16:54 ` [PATCH] selftests/filesystems: remove the unused list_del() Sasha Levin
2026-11-03 16:54 ` [PATCH] selftests/statmount: initialize the byte written to the child Sasha Levin
@ 2026-11-03 16:54 ` Sasha Levin
2026-11-05 22:04 ` (subset) " Christian Brauner
2026-11-05 22:12 ` Christian Brauner
2026-11-03 16:54 ` [PATCH nf-next] selftests: netfilter: nf_queue: drop the no-op loop initializer Sasha Levin
` (2 subsequent siblings)
5 siblings, 2 replies; 16+ messages in thread
From: Sasha Levin @ 2026-11-03 16:54 UTC (permalink / raw)
To: Christian Brauner
Cc: Sasha Levin, Shuah Khan, Nathan Chancellor, linux-fsdevel,
linux-kselftest, llvm, linux-kernel
The children in listns_pagination_bug and stress_test write c to the
parent only to say they are ready, but never set it, and clang 21
warns:
stress_test.c:137:22: warning: variable 'c' is uninitialized when passed as a const pointer argument here [-Wuninitialized-const-pointer]
Initialize it to 'X', as the parent does with its byte.
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
Found with clang 21. The namespaces tests aren't in TARGETS in
tools/testing/selftests/Makefile, so CI doesn't build or run them. Is
that on purpose?
| 2 +-
tools/testing/selftests/namespaces/stress_test.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
--git a/tools/testing/selftests/namespaces/listns_pagination_bug.c b/tools/testing/selftests/namespaces/listns_pagination_bug.c
index da7d33f963972..6452825e88506 100644
--- a/tools/testing/selftests/namespaces/listns_pagination_bug.c
+++ b/tools/testing/selftests/namespaces/listns_pagination_bug.c
@@ -46,7 +46,7 @@ TEST(pagination_with_type_filter)
ASSERT_GE(pids[i], 0);
if (pids[i] == 0) {
- char c;
+ char c = 'X';
close(sv[0]);
if (setup_userns() < 0) {
diff --git a/tools/testing/selftests/namespaces/stress_test.c b/tools/testing/selftests/namespaces/stress_test.c
index dd7df7d6cb277..6a27b98c5bc2a 100644
--- a/tools/testing/selftests/namespaces/stress_test.c
+++ b/tools/testing/selftests/namespaces/stress_test.c
@@ -124,7 +124,7 @@ TEST(many_concurrent_namespaces)
if (pids[i] == 0) {
/* Child: create user namespace and wait for parent signal */
- char c;
+ char c = 'X';
close(sv[0]);
@@ -366,7 +366,7 @@ TEST(listns_pagination_stress)
ASSERT_GE(pids[i], 0);
if (pids[i] == 0) {
- char c;
+ char c = 'X';
close(sv[0]);
if (setup_userns() < 0) {
--
2.53.0
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: (subset) [PATCH] selftests/namespaces: initialize the byte the children write
2026-11-03 16:54 ` [PATCH] selftests/namespaces: initialize the byte the children write Sasha Levin
@ 2026-11-05 22:04 ` Christian Brauner
2026-11-05 22:12 ` Christian Brauner
1 sibling, 0 replies; 16+ messages in thread
From: Christian Brauner @ 2026-11-05 22:04 UTC (permalink / raw)
To: Sasha Levin
Cc: Shuah Khan, Nathan Chancellor, linux-fsdevel, linux-kselftest,
llvm, linux-kernel
On Tue, 03 Nov 2026 11:54:17 -0500, Sasha Levin wrote:
> The children in listns_pagination_bug and stress_test write c to the
> parent only to say they are ready, but never set it, and clang 21
> warns:
>
> stress_test.c:137:22: warning: variable 'c' is uninitialized when passed as a const pointer argument here [-Wuninitialized-const-pointer]
>
> Initialize it to 'X', as the parent does with its byte.
>
> [...]
Applied to the vfs-7.5.misc branch of the vfs/vfs.git tree.
Patches in the vfs-7.5.misc branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs-7.5.misc
[1/1] selftests/namespaces: initialize the byte the children write
https://git.kernel.org/vfs/vfs/c/b2971bf97205
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH] selftests/namespaces: initialize the byte the children write
2026-11-03 16:54 ` [PATCH] selftests/namespaces: initialize the byte the children write Sasha Levin
2026-11-05 22:04 ` (subset) " Christian Brauner
@ 2026-11-05 22:12 ` Christian Brauner
2026-11-06 1:52 ` [PATCH] selftests: add namespaces to TARGETS Sasha Levin
1 sibling, 1 reply; 16+ messages in thread
From: Christian Brauner @ 2026-11-05 22:12 UTC (permalink / raw)
To: Sasha Levin
Cc: Shuah Khan, Nathan Chancellor, linux-fsdevel, linux-kselftest,
llvm, linux-kernel
On Tue, Nov 03, 2026 at 11:54:17AM -0500, Sasha Levin wrote:
> Found with clang 21. The namespaces tests aren't in TARGETS in
> tools/testing/selftests/Makefile, so CI doesn't build or run them. Is
> that on purpose?
That's an accident. Please send a patch adding it. Thanks for spotting it.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH] selftests: add namespaces to TARGETS
2026-11-05 22:12 ` Christian Brauner
@ 2026-11-06 1:52 ` Sasha Levin
0 siblings, 0 replies; 16+ messages in thread
From: Sasha Levin @ 2026-11-06 1:52 UTC (permalink / raw)
To: Christian Brauner
Cc: Shuah Khan, Nathan Chancellor, linux-fsdevel, linux-kselftest,
llvm, linux-kernel
The namespaces tests are not in TARGETS, so "make kselftest" and the CI
systems that use the top-level Makefile never build or run them. Add
them.
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
Tested on vfs-7.5.misc with gcc 16 and clang 21 on x86_64: all 13
tests pass in a VM with the namespaces config fragment, and they also
build for i386 and arm64.
tools/testing/selftests/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
index 07c3719f8b04b..f8fb771d3b0e8 100644
--- a/tools/testing/selftests/Makefile
+++ b/tools/testing/selftests/Makefile
@@ -85,6 +85,7 @@ TARGETS += mount_setattr
TARGETS += move_mount_set_group
TARGETS += mqueue
TARGETS += mseal_system_mappings
+TARGETS += namespaces
TARGETS += nci
TARGETS += net
TARGETS += net/af_unix
base-commit: 8f92edb375bc5b54b211686231d489912a91b32a
--
2.53.0
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH nf-next] selftests: netfilter: nf_queue: drop the no-op loop initializer
2026-11-03 16:54 [PATCH] selftests/fs/mount-notify: fix the indentation in the fsmount test Sasha Levin
` (2 preceding siblings ...)
2026-11-03 16:54 ` [PATCH] selftests/namespaces: initialize the byte the children write Sasha Levin
@ 2026-11-03 16:54 ` Sasha Levin
2026-11-04 1:49 ` Hangbin Liu
2026-11-04 8:37 ` Fernando Fernandez Mancera
2026-11-03 16:54 ` [PATCH net-next] selftests: net: tcp_ao: make the netstat column pointer const Sasha Levin
2026-11-05 22:01 ` [PATCH] selftests/fs/mount-notify: fix the indentation in the fsmount test Christian Brauner
5 siblings, 2 replies; 16+ messages in thread
From: Sasha Levin @ 2026-11-03 16:54 UTC (permalink / raw)
To: Pablo Neira Ayuso, Florian Westphal
Cc: Sasha Levin, Phil Sutter, Fernando Fernandez Mancera,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Simon Horman, Shuah Khan, Nathan Chancellor, netfilter-devel,
coreteam, netdev, linux-kselftest, llvm, linux-kernel
The out-of-order verdict loop starts with "for (ooo_count; ...", and
clang warns about the unused expression:
nf_queue.c:354:10: warning: expression result unused [-Wunused-value]
Leave the initializer empty.
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
KernelCI's clang builds show this warning.
tools/testing/selftests/net/netfilter/nf_queue.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/net/netfilter/nf_queue.c b/tools/testing/selftests/net/netfilter/nf_queue.c
index cca6c3cfa9e46..bc0b2f601a0a4 100644
--- a/tools/testing/selftests/net/netfilter/nf_queue.c
+++ b/tools/testing/selftests/net/netfilter/nf_queue.c
@@ -351,7 +351,7 @@ static int mainloop(void)
if (opts.out_of_order) {
ooo_ids[ooo_count] = id;
if (ooo_count >= 15) {
- for (ooo_count; ooo_count >= 0; ooo_count--) {
+ for (; ooo_count >= 0; ooo_count--) {
nlh = nfq_build_verdict(buf, ooo_ids[ooo_count],
opts.queue_num, opts.verdict);
if (mnl_socket_sendto(nl, nlh, nlh->nlmsg_len) < 0) {
--
2.53.0
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH nf-next] selftests: netfilter: nf_queue: drop the no-op loop initializer
2026-11-03 16:54 ` [PATCH nf-next] selftests: netfilter: nf_queue: drop the no-op loop initializer Sasha Levin
@ 2026-11-04 1:49 ` Hangbin Liu
2026-11-04 8:37 ` Fernando Fernandez Mancera
1 sibling, 0 replies; 16+ messages in thread
From: Hangbin Liu @ 2026-11-04 1:49 UTC (permalink / raw)
To: Sasha Levin
Cc: Pablo Neira Ayuso, Florian Westphal, Phil Sutter,
Fernando Fernandez Mancera, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Simon Horman, Shuah Khan,
Nathan Chancellor, netfilter-devel, coreteam, netdev,
linux-kselftest, llvm, linux-kernel
On Tue, Nov 03, 2026 at 11:54:18AM -0500, Sasha Levin wrote:
> The out-of-order verdict loop starts with "for (ooo_count; ...", and
> clang warns about the unused expression:
>
> nf_queue.c:354:10: warning: expression result unused [-Wunused-value]
>
> Leave the initializer empty.
>
> Signed-off-by: Sasha Levin <sashal@kernel.org>
> ---
> KernelCI's clang builds show this warning.
>
> tools/testing/selftests/net/netfilter/nf_queue.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/net/netfilter/nf_queue.c b/tools/testing/selftests/net/netfilter/nf_queue.c
> index cca6c3cfa9e46..bc0b2f601a0a4 100644
> --- a/tools/testing/selftests/net/netfilter/nf_queue.c
> +++ b/tools/testing/selftests/net/netfilter/nf_queue.c
> @@ -351,7 +351,7 @@ static int mainloop(void)
> if (opts.out_of_order) {
> ooo_ids[ooo_count] = id;
> if (ooo_count >= 15) {
> - for (ooo_count; ooo_count >= 0; ooo_count--) {
> + for (; ooo_count >= 0; ooo_count--) {
> nlh = nfq_build_verdict(buf, ooo_ids[ooo_count],
> opts.queue_num, opts.verdict);
> if (mnl_socket_sendto(nl, nlh, nlh->nlmsg_len) < 0) {
> --
> 2.53.0
>
Reviewed-by: Hangbin Liu <liuhangbin@kylinos.cn>
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH nf-next] selftests: netfilter: nf_queue: drop the no-op loop initializer
2026-11-03 16:54 ` [PATCH nf-next] selftests: netfilter: nf_queue: drop the no-op loop initializer Sasha Levin
2026-11-04 1:49 ` Hangbin Liu
@ 2026-11-04 8:37 ` Fernando Fernandez Mancera
1 sibling, 0 replies; 16+ messages in thread
From: Fernando Fernandez Mancera @ 2026-11-04 8:37 UTC (permalink / raw)
To: Sasha Levin, Pablo Neira Ayuso, Florian Westphal
Cc: Phil Sutter, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Simon Horman, Shuah Khan, Nathan Chancellor,
netfilter-devel, coreteam, netdev, linux-kselftest, llvm,
linux-kernel
On 11/3/26 5:54 PM, Sasha Levin wrote:
> The out-of-order verdict loop starts with "for (ooo_count; ...", and
> clang warns about the unused expression:
>
> nf_queue.c:354:10: warning: expression result unused [-Wunused-value]
>
> Leave the initializer empty.
>
> Signed-off-by: Sasha Levin <sashal@kernel.org>
> ---
> KernelCI's clang builds show this warning.
>
> tools/testing/selftests/net/netfilter/nf_queue.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/net/netfilter/nf_queue.c b/tools/testing/selftests/net/netfilter/nf_queue.c
> index cca6c3cfa9e46..bc0b2f601a0a4 100644
> --- a/tools/testing/selftests/net/netfilter/nf_queue.c
> +++ b/tools/testing/selftests/net/netfilter/nf_queue.c
> @@ -351,7 +351,7 @@ static int mainloop(void)
> if (opts.out_of_order) {
> ooo_ids[ooo_count] = id;
> if (ooo_count >= 15) {
> - for (ooo_count; ooo_count >= 0; ooo_count--) {
> + for (; ooo_count >= 0; ooo_count--) {
> nlh = nfq_build_verdict(buf, ooo_ids[ooo_count],
> opts.queue_num, opts.verdict);
> if (mnl_socket_sendto(nl, nlh, nlh->nlmsg_len) < 0) {
Reviewed-by: Fernando Fernandez Mancera <fmancera@suse.de>
Thanks!
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH net-next] selftests: net: tcp_ao: make the netstat column pointer const
2026-11-03 16:54 [PATCH] selftests/fs/mount-notify: fix the indentation in the fsmount test Sasha Levin
` (3 preceding siblings ...)
2026-11-03 16:54 ` [PATCH nf-next] selftests: netfilter: nf_queue: drop the no-op loop initializer Sasha Levin
@ 2026-11-03 16:54 ` Sasha Levin
2026-11-04 1:48 ` Hangbin Liu
2026-11-04 13:46 ` Dmitry Safonov
2026-11-05 22:01 ` [PATCH] selftests/fs/mount-notify: fix the indentation in the fsmount test Christian Brauner
5 siblings, 2 replies; 16+ messages in thread
From: Sasha Levin @ 2026-11-03 16:54 UTC (permalink / raw)
To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: Sasha Levin, Simon Horman, Dmitry Safonov, Shuah Khan, netdev,
linux-kselftest, linux-kernel
lookup_get_column() stores the result of strchr() on a const string in
a plain char pointer. Since glibc 2.43, strchr() returns a const char
pointer for a const argument when C23 features are enabled, as they
are with _GNU_SOURCE, so gcc and clang warn:
lib/proc.c:61:16: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
The pointer is only used to compute the length, so make it const.
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
Found with gcc 16 and clang 21 on glibc 2.43; KernelCI's gcc 15 builds
show the same warning.
tools/testing/selftests/net/tcp_ao/lib/proc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/net/tcp_ao/lib/proc.c b/tools/testing/selftests/net/tcp_ao/lib/proc.c
index 8b984fa042869..50062b527a393 100644
--- a/tools/testing/selftests/net/tcp_ao/lib/proc.c
+++ b/tools/testing/selftests/net/tcp_ao/lib/proc.c
@@ -56,7 +56,7 @@ static struct netstat *lookup_get(struct netstat *ns,
static struct netstat *lookup_get_column(struct netstat *ns, const char *line)
{
- char *column;
+ const char *column;
column = strchr(line, ':');
if (!column)
--
2.53.0
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH net-next] selftests: net: tcp_ao: make the netstat column pointer const
2026-11-03 16:54 ` [PATCH net-next] selftests: net: tcp_ao: make the netstat column pointer const Sasha Levin
@ 2026-11-04 1:48 ` Hangbin Liu
2026-11-04 13:46 ` Dmitry Safonov
1 sibling, 0 replies; 16+ messages in thread
From: Hangbin Liu @ 2026-11-04 1:48 UTC (permalink / raw)
To: Sasha Levin
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Simon Horman, Dmitry Safonov, Shuah Khan, netdev,
linux-kselftest, linux-kernel
On Tue, Nov 03, 2026 at 11:54:19AM -0500, Sasha Levin wrote:
> lookup_get_column() stores the result of strchr() on a const string in
> a plain char pointer. Since glibc 2.43, strchr() returns a const char
> pointer for a const argument when C23 features are enabled, as they
> are with _GNU_SOURCE, so gcc and clang warn:
>
> lib/proc.c:61:16: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
>
> The pointer is only used to compute the length, so make it const.
>
> Signed-off-by: Sasha Levin <sashal@kernel.org>
> ---
> Found with gcc 16 and clang 21 on glibc 2.43; KernelCI's gcc 15 builds
> show the same warning.
>
> tools/testing/selftests/net/tcp_ao/lib/proc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/net/tcp_ao/lib/proc.c b/tools/testing/selftests/net/tcp_ao/lib/proc.c
> index 8b984fa042869..50062b527a393 100644
> --- a/tools/testing/selftests/net/tcp_ao/lib/proc.c
> +++ b/tools/testing/selftests/net/tcp_ao/lib/proc.c
> @@ -56,7 +56,7 @@ static struct netstat *lookup_get(struct netstat *ns,
>
> static struct netstat *lookup_get_column(struct netstat *ns, const char *line)
> {
> - char *column;
> + const char *column;
>
> column = strchr(line, ':');
> if (!column)
> --
> 2.53.0
>
Reviewed-by: Hangbin Liu <liuhangbin@kylinos.cn>
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH net-next] selftests: net: tcp_ao: make the netstat column pointer const
2026-11-03 16:54 ` [PATCH net-next] selftests: net: tcp_ao: make the netstat column pointer const Sasha Levin
2026-11-04 1:48 ` Hangbin Liu
@ 2026-11-04 13:46 ` Dmitry Safonov
1 sibling, 0 replies; 16+ messages in thread
From: Dmitry Safonov @ 2026-11-04 13:46 UTC (permalink / raw)
To: Sasha Levin
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Simon Horman, Shuah Khan, netdev, linux-kselftest, linux-kernel
On Tue, 3 Nov 2026 at 16:54, Sasha Levin <sashal@kernel.org> wrote:
>
> lookup_get_column() stores the result of strchr() on a const string in
> a plain char pointer. Since glibc 2.43, strchr() returns a const char
> pointer for a const argument when C23 features are enabled, as they
> are with _GNU_SOURCE, so gcc and clang warn:
>
> lib/proc.c:61:16: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
>
> The pointer is only used to compute the length, so make it const.
>
> Signed-off-by: Sasha Levin <sashal@kernel.org>
Acked-by: Dmitry Safonov <0x7f454c46@gmail.com>
Thanks!
> ---
> Found with gcc 16 and clang 21 on glibc 2.43; KernelCI's gcc 15 builds
> show the same warning.
>
> tools/testing/selftests/net/tcp_ao/lib/proc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/net/tcp_ao/lib/proc.c b/tools/testing/selftests/net/tcp_ao/lib/proc.c
> index 8b984fa042869..50062b527a393 100644
> --- a/tools/testing/selftests/net/tcp_ao/lib/proc.c
> +++ b/tools/testing/selftests/net/tcp_ao/lib/proc.c
> @@ -56,7 +56,7 @@ static struct netstat *lookup_get(struct netstat *ns,
>
> static struct netstat *lookup_get_column(struct netstat *ns, const char *line)
> {
> - char *column;
> + const char *column;
>
> column = strchr(line, ':');
> if (!column)
> --
> 2.53.0
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] selftests/fs/mount-notify: fix the indentation in the fsmount test
2026-11-03 16:54 [PATCH] selftests/fs/mount-notify: fix the indentation in the fsmount test Sasha Levin
` (4 preceding siblings ...)
2026-11-03 16:54 ` [PATCH net-next] selftests: net: tcp_ao: make the netstat column pointer const Sasha Levin
@ 2026-11-05 22:01 ` Christian Brauner
5 siblings, 0 replies; 16+ messages in thread
From: Christian Brauner @ 2026-11-05 22:01 UTC (permalink / raw)
To: Jan Kara, Sasha Levin
Cc: Amir Goldstein, Miklos Szeredi, Shuah Khan, Nathan Chancellor,
linux-fsdevel, linux-kselftest, llvm, linux-kernel
On Tue, 03 Nov 2026 11:54:14 -0500, Sasha Levin wrote:
> A few lines in the fsmount test are indented with spaces instead of a
> tab. That puts them deeper than the ASSERT_*() in front of them, which
> ends in a for loop with an empty body, so clang warns:
>
> mount-notify_test.c:338:18: warning: for loop has empty body [-Wempty-body]
>
> Indent them with tabs.
>
> [...]
Applied to the vfs.fixes branch of the vfs/vfs.git tree.
Patches in the vfs.fixes branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.fixes
[1/1] selftests/fs/mount-notify: fix the indentation in the fsmount test
https://git.kernel.org/vfs/vfs/c/5e042e208dfe
^ permalink raw reply [flat|nested] 16+ messages in thread