Recently, I reviewed a patch on the mm/kselftest mailing list about a test which had obvious type mismatch fix in it. It was strange why that wasn't caught during development and when patch was accepted. This led me to discover that those extra compiler options to catch these warnings aren't being used. When I added them, I found tens of warnings in just mm suite.
In this series, I'm fixing those warnings. The last check adds the compiler flags with which the warnings have been caught.
Muhammad Usama Anjum (16): selftests/mm: remove argc and argv unused parameters selftests/mm: Fix unused parameter warnings selftests/mm: Fix unused parameter warnings selftests/mm: Fix type mismatch warnings selftests/mm: kselftest_harness: Fix warnings selftests/mm: cow: remove unused variables and fix type mismatch errors selftests/mm: hmm-tests: Remove always false expressions selftests/mm: guard-pages: Fix type mismatch warnings selftests/mm: hugetlb-madvise: fix type mismatch issues selftests/mm: hugepage-vmemmap: fix type mismatch warnings selftests/mm: hugetlb-read-hwpoison: Fix type mismatch warnings selftests/mm: khugepaged: Fix type mismatch warnings selftests/mm: protection_keys: Fix variables types mismatch warnings selftests/mm: thuge-gen: Fix type mismatch warnings selftests/mm: uffd-*: Fix all type mismatch warnings selftests/mm: Makefile: Add the compiler flags
tools/testing/selftests/kselftest_harness.h | 6 +- tools/testing/selftests/mm/Makefile | 1 + tools/testing/selftests/mm/compaction_test.c | 4 +- tools/testing/selftests/mm/cow.c | 48 ++++++++------- tools/testing/selftests/mm/droppable.c | 2 +- tools/testing/selftests/mm/guard-pages.c | 4 +- tools/testing/selftests/mm/gup_longterm.c | 5 +- tools/testing/selftests/mm/hmm-tests.c | 4 +- tools/testing/selftests/mm/hugepage-vmemmap.c | 5 +- tools/testing/selftests/mm/hugetlb-madvise.c | 4 +- .../selftests/mm/hugetlb-read-hwpoison.c | 6 +- .../selftests/mm/hugetlb-soft-offline.c | 2 +- tools/testing/selftests/mm/hugetlb_dio.c | 2 +- .../selftests/mm/hugetlb_fault_after_madv.c | 6 +- .../selftests/mm/hugetlb_madv_vs_map.c | 8 +-- tools/testing/selftests/mm/khugepaged.c | 16 ++--- .../selftests/mm/ksm_functional_tests.c | 6 +- tools/testing/selftests/mm/ksm_tests.c | 17 +++--- tools/testing/selftests/mm/madv_populate.c | 2 +- tools/testing/selftests/mm/map_populate.c | 2 +- tools/testing/selftests/mm/memfd_secret.c | 6 +- .../testing/selftests/mm/mlock-random-test.c | 6 +- tools/testing/selftests/mm/mlock2-tests.c | 2 +- tools/testing/selftests/mm/on-fault-limit.c | 2 +- tools/testing/selftests/mm/pkey-x86.h | 4 +- .../selftests/mm/pkey_sighandler_tests.c | 21 ++++--- tools/testing/selftests/mm/protection_keys.c | 34 ++++++----- tools/testing/selftests/mm/soft-dirty.c | 8 +-- .../selftests/mm/split_huge_page_test.c | 4 +- tools/testing/selftests/mm/thuge-gen.c | 10 ++-- tools/testing/selftests/mm/uffd-common.c | 24 ++++---- tools/testing/selftests/mm/uffd-common.h | 2 +- tools/testing/selftests/mm/uffd-stress.c | 4 +- tools/testing/selftests/mm/uffd-unit-tests.c | 58 +++++++++---------- tools/testing/selftests/mm/uffd-wp-mremap.c | 2 +- .../selftests/mm/virtual_address_range.c | 2 +- 36 files changed, 180 insertions(+), 159 deletions(-)
Remove the following warnings by removing unused argc and argv parameters: In function ‘main’: warning: unused parameter ‘argc’ [-Wunused-parameter] 158 | int main(int argc, char *argv[]) | ~~~~^~~~ warning: unused parameter ‘argv’ [-Wunused-parameter] 158 | int main(int argc, char *argv[]) | ~~~~~~^~~~~~
Signed-off-by: Muhammad Usama Anjum usama.anjum@collabora.com --- tools/testing/selftests/mm/compaction_test.c | 2 +- tools/testing/selftests/mm/cow.c | 2 +- tools/testing/selftests/mm/droppable.c | 2 +- tools/testing/selftests/mm/gup_longterm.c | 2 +- tools/testing/selftests/mm/hugepage-vmemmap.c | 2 +- tools/testing/selftests/mm/hugetlb-madvise.c | 2 +- tools/testing/selftests/mm/hugetlb-soft-offline.c | 2 +- tools/testing/selftests/mm/madv_populate.c | 2 +- tools/testing/selftests/mm/map_populate.c | 2 +- tools/testing/selftests/mm/memfd_secret.c | 2 +- tools/testing/selftests/mm/mlock-random-test.c | 2 +- tools/testing/selftests/mm/mlock2-tests.c | 2 +- tools/testing/selftests/mm/on-fault-limit.c | 2 +- tools/testing/selftests/mm/pkey_sighandler_tests.c | 2 +- tools/testing/selftests/mm/soft-dirty.c | 2 +- tools/testing/selftests/mm/uffd-wp-mremap.c | 2 +- tools/testing/selftests/mm/virtual_address_range.c | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/tools/testing/selftests/mm/compaction_test.c b/tools/testing/selftests/mm/compaction_test.c index 2c3a0eb6b22d3..8d23b698ce9db 100644 --- a/tools/testing/selftests/mm/compaction_test.c +++ b/tools/testing/selftests/mm/compaction_test.c @@ -194,7 +194,7 @@ int set_zero_hugepages(unsigned long *initial_nr_hugepages) return ret; }
-int main(int argc, char **argv) +int main(void) { struct rlimit lim; struct map_list *list = NULL, *entry; diff --git a/tools/testing/selftests/mm/cow.c b/tools/testing/selftests/mm/cow.c index 1238e1c5aae15..ea00c85c76caa 100644 --- a/tools/testing/selftests/mm/cow.c +++ b/tools/testing/selftests/mm/cow.c @@ -1769,7 +1769,7 @@ static int tests_per_non_anon_test_case(void) return tests; }
-int main(int argc, char **argv) +int main(void) { int err; struct thp_settings default_settings; diff --git a/tools/testing/selftests/mm/droppable.c b/tools/testing/selftests/mm/droppable.c index f3d9ecf96890a..90ea6377810c5 100644 --- a/tools/testing/selftests/mm/droppable.c +++ b/tools/testing/selftests/mm/droppable.c @@ -15,7 +15,7 @@
#include "../kselftest.h"
-int main(int argc, char *argv[]) +int main(void) { size_t alloc_size = 134217728; size_t page_size = getpagesize(); diff --git a/tools/testing/selftests/mm/gup_longterm.c b/tools/testing/selftests/mm/gup_longterm.c index 9423ad439a614..03a31dcb57577 100644 --- a/tools/testing/selftests/mm/gup_longterm.c +++ b/tools/testing/selftests/mm/gup_longterm.c @@ -444,7 +444,7 @@ static int tests_per_test_case(void) return 3 + nr_hugetlbsizes; }
-int main(int argc, char **argv) +int main(void) { int i, err;
diff --git a/tools/testing/selftests/mm/hugepage-vmemmap.c b/tools/testing/selftests/mm/hugepage-vmemmap.c index df366a4d1b92d..23e97e552057d 100644 --- a/tools/testing/selftests/mm/hugepage-vmemmap.c +++ b/tools/testing/selftests/mm/hugepage-vmemmap.c @@ -87,7 +87,7 @@ static int check_page_flags(unsigned long pfn) return 0; }
-int main(int argc, char **argv) +int main(void) { void *addr; unsigned long pfn; diff --git a/tools/testing/selftests/mm/hugetlb-madvise.c b/tools/testing/selftests/mm/hugetlb-madvise.c index e74107185324f..43f16c12c8e9a 100644 --- a/tools/testing/selftests/mm/hugetlb-madvise.c +++ b/tools/testing/selftests/mm/hugetlb-madvise.c @@ -58,7 +58,7 @@ void read_fault_pages(void *addr, unsigned long nr_pages) } }
-int main(int argc, char **argv) +int main(int __attribute__((unused)) argc, char **argv) { unsigned long free_hugepages; void *addr, *addr2; diff --git a/tools/testing/selftests/mm/hugetlb-soft-offline.c b/tools/testing/selftests/mm/hugetlb-soft-offline.c index f086f0e04756f..cb087303f5ed3 100644 --- a/tools/testing/selftests/mm/hugetlb-soft-offline.c +++ b/tools/testing/selftests/mm/hugetlb-soft-offline.c @@ -216,7 +216,7 @@ static void test_soft_offline_common(int enable_soft_offline) enable_soft_offline); }
-int main(int argc, char **argv) +int main(void) { ksft_print_header(); ksft_set_plan(2); diff --git a/tools/testing/selftests/mm/madv_populate.c b/tools/testing/selftests/mm/madv_populate.c index ef7d911da13e0..c6a3ee56a54a9 100644 --- a/tools/testing/selftests/mm/madv_populate.c +++ b/tools/testing/selftests/mm/madv_populate.c @@ -281,7 +281,7 @@ static int system_has_softdirty(void) #endif }
-int main(int argc, char **argv) +int main(void) { int nr_tests = 16; int err; diff --git a/tools/testing/selftests/mm/map_populate.c b/tools/testing/selftests/mm/map_populate.c index 5c8a53869b1bd..0dd849b4affa6 100644 --- a/tools/testing/selftests/mm/map_populate.c +++ b/tools/testing/selftests/mm/map_populate.c @@ -74,7 +74,7 @@ static int child_f(int sock, unsigned long *smap, int fd) return ksft_cnt.ksft_pass; }
-int main(int argc, char **argv) +int main(void) { int sock[2], child, ret; FILE *ftmp; diff --git a/tools/testing/selftests/mm/memfd_secret.c b/tools/testing/selftests/mm/memfd_secret.c index 74c911aa3aea9..b9659fa357371 100644 --- a/tools/testing/selftests/mm/memfd_secret.c +++ b/tools/testing/selftests/mm/memfd_secret.c @@ -297,7 +297,7 @@ static void prepare(void)
#define NUM_TESTS 6
-int main(int argc, char *argv[]) +int main(void) { int fd;
diff --git a/tools/testing/selftests/mm/mlock-random-test.c b/tools/testing/selftests/mm/mlock-random-test.c index 1cd80b0f76c33..0d95d630d0450 100644 --- a/tools/testing/selftests/mm/mlock-random-test.c +++ b/tools/testing/selftests/mm/mlock-random-test.c @@ -236,7 +236,7 @@ static void test_mlock_outof_limit(char *p, int alloc_size) ksft_test_result_pass("%s\n", __func__); }
-int main(int argc, char **argv) +int main(void) { char *p = NULL;
diff --git a/tools/testing/selftests/mm/mlock2-tests.c b/tools/testing/selftests/mm/mlock2-tests.c index 7f0d50fa361dc..358711e8191f7 100644 --- a/tools/testing/selftests/mm/mlock2-tests.c +++ b/tools/testing/selftests/mm/mlock2-tests.c @@ -425,7 +425,7 @@ static void test_mlockall(void) munlockall(); }
-int main(int argc, char **argv) +int main(void) { int ret, size = 3 * getpagesize(); void *map; diff --git a/tools/testing/selftests/mm/on-fault-limit.c b/tools/testing/selftests/mm/on-fault-limit.c index 431c1277d83a1..ade160966c926 100644 --- a/tools/testing/selftests/mm/on-fault-limit.c +++ b/tools/testing/selftests/mm/on-fault-limit.c @@ -28,7 +28,7 @@ static void test_limit(void) munlockall(); }
-int main(int argc, char **argv) +int main(void) { ksft_print_header(); ksft_set_plan(1); diff --git a/tools/testing/selftests/mm/pkey_sighandler_tests.c b/tools/testing/selftests/mm/pkey_sighandler_tests.c index 1ac8c88098807..249989f8b7a2a 100644 --- a/tools/testing/selftests/mm/pkey_sighandler_tests.c +++ b/tools/testing/selftests/mm/pkey_sighandler_tests.c @@ -528,7 +528,7 @@ static void (*pkey_tests[])(void) = { test_pkru_sigreturn };
-int main(int argc, char *argv[]) +int main(void) { int i;
diff --git a/tools/testing/selftests/mm/soft-dirty.c b/tools/testing/selftests/mm/soft-dirty.c index 8e1462ce05326..7286c90fff1a3 100644 --- a/tools/testing/selftests/mm/soft-dirty.c +++ b/tools/testing/selftests/mm/soft-dirty.c @@ -187,7 +187,7 @@ static void test_mprotect_file(int pagemap_fd, int pagesize) test_mprotect(pagemap_fd, pagesize, false); }
-int main(int argc, char **argv) +int main(void) { int pagemap_fd; int pagesize; diff --git a/tools/testing/selftests/mm/uffd-wp-mremap.c b/tools/testing/selftests/mm/uffd-wp-mremap.c index 2c4f984bd73ca..f548b1e1f197c 100644 --- a/tools/testing/selftests/mm/uffd-wp-mremap.c +++ b/tools/testing/selftests/mm/uffd-wp-mremap.c @@ -331,7 +331,7 @@ static const struct testcase testcases[] = { }, };
-int main(int argc, char **argv) +int main(void) { struct thp_settings settings; int i, j, plan = 0; diff --git a/tools/testing/selftests/mm/virtual_address_range.c b/tools/testing/selftests/mm/virtual_address_range.c index 4042fd878acd7..7993583450766 100644 --- a/tools/testing/selftests/mm/virtual_address_range.c +++ b/tools/testing/selftests/mm/virtual_address_range.c @@ -158,7 +158,7 @@ static int validate_complete_va_space(void) return 0; }
-int main(int argc, char *argv[]) +int main(void) { char *ptr[NR_CHUNKS_LOW]; char **hptr;
On Thu, Jan 09, 2025 at 10:38:27PM +0500, Muhammad Usama Anjum wrote:
Remove the following warnings by removing unused argc and argv parameters: In function ‘main’: warning: unused parameter ‘argc’ [-Wunused-parameter] 158 | int main(int argc, char *argv[]) | ~~~~^~~~ warning: unused parameter ‘argv’ [-Wunused-parameter] 158 | int main(int argc, char *argv[]) | ~~~~~~^~~~~~
Signed-off-by: Muhammad Usama Anjum usama.anjum@collabora.com
tools/testing/selftests/mm/compaction_test.c | 2 +- tools/testing/selftests/mm/cow.c | 2 +- tools/testing/selftests/mm/droppable.c | 2 +- tools/testing/selftests/mm/gup_longterm.c | 2 +- tools/testing/selftests/mm/hugepage-vmemmap.c | 2 +- tools/testing/selftests/mm/hugetlb-madvise.c | 2 +- tools/testing/selftests/mm/hugetlb-soft-offline.c | 2 +- tools/testing/selftests/mm/madv_populate.c | 2 +- tools/testing/selftests/mm/map_populate.c | 2 +- tools/testing/selftests/mm/memfd_secret.c | 2 +- tools/testing/selftests/mm/mlock-random-test.c | 2 +- tools/testing/selftests/mm/mlock2-tests.c | 2 +- tools/testing/selftests/mm/on-fault-limit.c | 2 +- tools/testing/selftests/mm/pkey_sighandler_tests.c | 2 +- tools/testing/selftests/mm/soft-dirty.c | 2 +- tools/testing/selftests/mm/uffd-wp-mremap.c | 2 +- tools/testing/selftests/mm/virtual_address_range.c | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/tools/testing/selftests/mm/compaction_test.c b/tools/testing/selftests/mm/compaction_test.c index 2c3a0eb6b22d3..8d23b698ce9db 100644 --- a/tools/testing/selftests/mm/compaction_test.c +++ b/tools/testing/selftests/mm/compaction_test.c @@ -194,7 +194,7 @@ int set_zero_hugepages(unsigned long *initial_nr_hugepages) return ret; } -int main(int argc, char **argv) +int main(void) { struct rlimit lim; struct map_list *list = NULL, *entry; diff --git a/tools/testing/selftests/mm/cow.c b/tools/testing/selftests/mm/cow.c index 1238e1c5aae15..ea00c85c76caa 100644 --- a/tools/testing/selftests/mm/cow.c +++ b/tools/testing/selftests/mm/cow.c @@ -1769,7 +1769,7 @@ static int tests_per_non_anon_test_case(void) return tests; } -int main(int argc, char **argv) +int main(void) { int err; struct thp_settings default_settings; diff --git a/tools/testing/selftests/mm/droppable.c b/tools/testing/selftests/mm/droppable.c index f3d9ecf96890a..90ea6377810c5 100644 --- a/tools/testing/selftests/mm/droppable.c +++ b/tools/testing/selftests/mm/droppable.c @@ -15,7 +15,7 @@ #include "../kselftest.h" -int main(int argc, char *argv[]) +int main(void) { size_t alloc_size = 134217728; size_t page_size = getpagesize(); diff --git a/tools/testing/selftests/mm/gup_longterm.c b/tools/testing/selftests/mm/gup_longterm.c index 9423ad439a614..03a31dcb57577 100644 --- a/tools/testing/selftests/mm/gup_longterm.c +++ b/tools/testing/selftests/mm/gup_longterm.c @@ -444,7 +444,7 @@ static int tests_per_test_case(void) return 3 + nr_hugetlbsizes; } -int main(int argc, char **argv) +int main(void) { int i, err; diff --git a/tools/testing/selftests/mm/hugepage-vmemmap.c b/tools/testing/selftests/mm/hugepage-vmemmap.c index df366a4d1b92d..23e97e552057d 100644 --- a/tools/testing/selftests/mm/hugepage-vmemmap.c +++ b/tools/testing/selftests/mm/hugepage-vmemmap.c @@ -87,7 +87,7 @@ static int check_page_flags(unsigned long pfn) return 0; } -int main(int argc, char **argv) +int main(void) { void *addr; unsigned long pfn; diff --git a/tools/testing/selftests/mm/hugetlb-madvise.c b/tools/testing/selftests/mm/hugetlb-madvise.c index e74107185324f..43f16c12c8e9a 100644 --- a/tools/testing/selftests/mm/hugetlb-madvise.c +++ b/tools/testing/selftests/mm/hugetlb-madvise.c @@ -58,7 +58,7 @@ void read_fault_pages(void *addr, unsigned long nr_pages) } } -int main(int argc, char **argv) +int main(int __attribute__((unused)) argc, char **argv)
Can we add a macro in kselftest.h for "__unused" like the kernel already does? Then instead of removing args, we can just mark them, like you're doing here.
On 1/9/25 10:42 PM, Kees Cook wrote:
On Thu, Jan 09, 2025 at 10:38:27PM +0500, Muhammad Usama Anjum wrote:
Remove the following warnings by removing unused argc and argv parameters: In function ‘main’: warning: unused parameter ‘argc’ [-Wunused-parameter] 158 | int main(int argc, char *argv[]) | ~~~~^~~~ warning: unused parameter ‘argv’ [-Wunused-parameter] 158 | int main(int argc, char *argv[]) | ~~~~~~^~~~~~
Signed-off-by: Muhammad Usama Anjum usama.anjum@collabora.com
tools/testing/selftests/mm/compaction_test.c | 2 +- tools/testing/selftests/mm/cow.c | 2 +- tools/testing/selftests/mm/droppable.c | 2 +- tools/testing/selftests/mm/gup_longterm.c | 2 +- tools/testing/selftests/mm/hugepage-vmemmap.c | 2 +- tools/testing/selftests/mm/hugetlb-madvise.c | 2 +- tools/testing/selftests/mm/hugetlb-soft-offline.c | 2 +- tools/testing/selftests/mm/madv_populate.c | 2 +- tools/testing/selftests/mm/map_populate.c | 2 +- tools/testing/selftests/mm/memfd_secret.c | 2 +- tools/testing/selftests/mm/mlock-random-test.c | 2 +- tools/testing/selftests/mm/mlock2-tests.c | 2 +- tools/testing/selftests/mm/on-fault-limit.c | 2 +- tools/testing/selftests/mm/pkey_sighandler_tests.c | 2 +- tools/testing/selftests/mm/soft-dirty.c | 2 +- tools/testing/selftests/mm/uffd-wp-mremap.c | 2 +- tools/testing/selftests/mm/virtual_address_range.c | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/tools/testing/selftests/mm/compaction_test.c b/tools/testing/selftests/mm/compaction_test.c index 2c3a0eb6b22d3..8d23b698ce9db 100644 --- a/tools/testing/selftests/mm/compaction_test.c +++ b/tools/testing/selftests/mm/compaction_test.c @@ -194,7 +194,7 @@ int set_zero_hugepages(unsigned long *initial_nr_hugepages) return ret; } -int main(int argc, char **argv) +int main(void) { struct rlimit lim; struct map_list *list = NULL, *entry; diff --git a/tools/testing/selftests/mm/cow.c b/tools/testing/selftests/mm/cow.c index 1238e1c5aae15..ea00c85c76caa 100644 --- a/tools/testing/selftests/mm/cow.c +++ b/tools/testing/selftests/mm/cow.c @@ -1769,7 +1769,7 @@ static int tests_per_non_anon_test_case(void) return tests; } -int main(int argc, char **argv) +int main(void) { int err; struct thp_settings default_settings; diff --git a/tools/testing/selftests/mm/droppable.c b/tools/testing/selftests/mm/droppable.c index f3d9ecf96890a..90ea6377810c5 100644 --- a/tools/testing/selftests/mm/droppable.c +++ b/tools/testing/selftests/mm/droppable.c @@ -15,7 +15,7 @@ #include "../kselftest.h" -int main(int argc, char *argv[]) +int main(void) { size_t alloc_size = 134217728; size_t page_size = getpagesize(); diff --git a/tools/testing/selftests/mm/gup_longterm.c b/tools/testing/selftests/mm/gup_longterm.c index 9423ad439a614..03a31dcb57577 100644 --- a/tools/testing/selftests/mm/gup_longterm.c +++ b/tools/testing/selftests/mm/gup_longterm.c @@ -444,7 +444,7 @@ static int tests_per_test_case(void) return 3 + nr_hugetlbsizes; } -int main(int argc, char **argv) +int main(void) { int i, err; diff --git a/tools/testing/selftests/mm/hugepage-vmemmap.c b/tools/testing/selftests/mm/hugepage-vmemmap.c index df366a4d1b92d..23e97e552057d 100644 --- a/tools/testing/selftests/mm/hugepage-vmemmap.c +++ b/tools/testing/selftests/mm/hugepage-vmemmap.c @@ -87,7 +87,7 @@ static int check_page_flags(unsigned long pfn) return 0; } -int main(int argc, char **argv) +int main(void) { void *addr; unsigned long pfn; diff --git a/tools/testing/selftests/mm/hugetlb-madvise.c b/tools/testing/selftests/mm/hugetlb-madvise.c index e74107185324f..43f16c12c8e9a 100644 --- a/tools/testing/selftests/mm/hugetlb-madvise.c +++ b/tools/testing/selftests/mm/hugetlb-madvise.c @@ -58,7 +58,7 @@ void read_fault_pages(void *addr, unsigned long nr_pages) } } -int main(int argc, char **argv) +int main(int __attribute__((unused)) argc, char **argv)
Can we add a macro in kselftest.h for "__unused" like the kernel already does?
It can be done. But as there kselftest patches aren't regulated as much as other kernel patches, people may still not use this macro and use the gcc attribute directly. Let's see what others have to say.
Then instead of removing args, we can just mark them, like you're doing here.
In this case, argv is being used while argc isn't being used. I didn't find a way to keep argv and remove argc. Hence I marked argc as unused.
For the all other case, why should we keep argv/argc and mark them unused as well when they aren't being used?
On Thu, Jan 09, 2025 at 10:48:52PM +0500, Muhammad Usama Anjum wrote:
For the all other case, why should we keep argv/argc and mark them unused as well when they aren't being used?
I'm fine either way, but my personal code style instinct is to keep the "standard" main declaration with argc/argv present. But it's mostly aesthetic.
And if you think use of kselftest.h isn't universal, then perhaps we can avoid the macro, but it does seem nicer and more "normal" feeling for the rest of kernel development.
-Kees
On Thu, 9 Jan 2025 09:50:45 -0800 Kees Cook kees@kernel.org wrote:
On Thu, Jan 09, 2025 at 10:48:52PM +0500, Muhammad Usama Anjum wrote:
For the all other case, why should we keep argv/argc and mark them unused as well when they aren't being used?
I'm fine either way, but my personal code style instinct is to keep the "standard" main declaration with argc/argv present. But it's mostly aesthetic.
And if you think use of kselftest.h isn't universal, then perhaps we can avoid the macro, but it does seem nicer and more "normal" feeling for the rest of kernel development.
Agreed. __attribute__((unused)) is a bit of a mouthful and isn't what the kernel developer's eye expects to see.
On 1/10/25 5:12 AM, Andrew Morton wrote:
On Thu, 9 Jan 2025 09:50:45 -0800 Kees Cook kees@kernel.org wrote:
On Thu, Jan 09, 2025 at 10:48:52PM +0500, Muhammad Usama Anjum wrote:
For the all other case, why should we keep argv/argc and mark them unused as well when they aren't being used?
I'm fine either way, but my personal code style instinct is to keep the "standard" main declaration with argc/argv present. But it's mostly aesthetic.
And if you think use of kselftest.h isn't universal, then perhaps we can avoid the macro, but it does seem nicer and more "normal" feeling for the rest of kernel development.
Agreed. __attribute__((unused)) is a bit of a mouthful and isn't what the kernel developer's eye expects to see.
In the next version, I'll add a macro and use that.
On Thu, 9 Jan 2025 22:38:27 +0500 Muhammad Usama Anjum usama.anjum@collabora.com wrote:
Remove the following warnings by removing unused argc and argv parameters: In function ‘main’: warning: unused parameter ‘argc’ [-Wunused-parameter] 158 | int main(int argc, char *argv[]) | ~~~~^~~~ warning: unused parameter ‘argv’ [-Wunused-parameter] 158 | int main(int argc, char *argv[])
...
diff --git a/tools/testing/selftests/mm/compaction_test.c b/tools/testing/selftests/mm/compaction_test.c index 2c3a0eb6b22d3..8d23b698ce9db 100644 --- a/tools/testing/selftests/mm/compaction_test.c +++ b/tools/testing/selftests/mm/compaction_test.c @@ -194,7 +194,7 @@ int set_zero_hugepages(unsigned long *initial_nr_hugepages) return ret; } -int main(int argc, char **argv) +int main(void)
Doesn't that generate a different warning because main() is a special function and gcc knows the arguments it should have.
Just disable -Wunused-parameter - there are far too many places where it produces unwanted warnings.
David
On 1/11/25 12:00 AM, David Laight wrote:
On Thu, 9 Jan 2025 22:38:27 +0500 Muhammad Usama Anjum usama.anjum@collabora.com wrote:
Remove the following warnings by removing unused argc and argv parameters: In function ‘main’: warning: unused parameter ‘argc’ [-Wunused-parameter] 158 | int main(int argc, char *argv[]) | ~~~~^~~~ warning: unused parameter ‘argv’ [-Wunused-parameter] 158 | int main(int argc, char *argv[])
...
diff --git a/tools/testing/selftests/mm/compaction_test.c b/tools/testing/selftests/mm/compaction_test.c index 2c3a0eb6b22d3..8d23b698ce9db 100644 --- a/tools/testing/selftests/mm/compaction_test.c +++ b/tools/testing/selftests/mm/compaction_test.c @@ -194,7 +194,7 @@ int set_zero_hugepages(unsigned long *initial_nr_hugepages) return ret; } -int main(int argc, char **argv) +int main(void)
Doesn't that generate a different warning because main() is a special function and gcc knows the arguments it should have.
No, we still get unused argument warning.
Just disable -Wunused-parameter - there are far too many places where it produces unwanted warnings.
The purpose is to run static analyzer and find obvious errors to enhance quality of the code which is only possible if we start using these compiler flags. This is just my thinking.
Feel free to share your thoughts?
Fix warnings generated by unused parameters.
Signed-off-by: Muhammad Usama Anjum usama.anjum@collabora.com --- .../selftests/mm/hugetlb_fault_after_madv.c | 4 +- .../selftests/mm/hugetlb_madv_vs_map.c | 6 +-- tools/testing/selftests/mm/ksm_tests.c | 17 +++--- tools/testing/selftests/mm/memfd_secret.c | 4 +- tools/testing/selftests/mm/soft-dirty.c | 4 +- .../selftests/mm/split_huge_page_test.c | 4 +- tools/testing/selftests/mm/uffd-common.c | 18 ++++--- tools/testing/selftests/mm/uffd-common.h | 2 +- tools/testing/selftests/mm/uffd-stress.c | 2 +- tools/testing/selftests/mm/uffd-unit-tests.c | 52 +++++++++---------- 10 files changed, 57 insertions(+), 56 deletions(-)
diff --git a/tools/testing/selftests/mm/hugetlb_fault_after_madv.c b/tools/testing/selftests/mm/hugetlb_fault_after_madv.c index e2640529dbb29..e62f4e1388f26 100644 --- a/tools/testing/selftests/mm/hugetlb_fault_after_madv.c +++ b/tools/testing/selftests/mm/hugetlb_fault_after_madv.c @@ -28,7 +28,7 @@ static void signal_handler(int signal) }
/* Touch the memory while it is being madvised() */ -void *touch(void *unused) +void *touch(void __attribute__((unused)) *unused) { char *ptr = (char *)huge_ptr;
@@ -41,7 +41,7 @@ void *touch(void *unused) return NULL; }
-void *madv(void *unused) +void *madv(void __attribute__((unused)) *unused) { usleep(rand() % 10);
diff --git a/tools/testing/selftests/mm/hugetlb_madv_vs_map.c b/tools/testing/selftests/mm/hugetlb_madv_vs_map.c index 8f122a0f08281..6c326cf3dcf6b 100644 --- a/tools/testing/selftests/mm/hugetlb_madv_vs_map.c +++ b/tools/testing/selftests/mm/hugetlb_madv_vs_map.c @@ -33,7 +33,7 @@ size_t mmap_size; char *huge_ptr;
/* Touch the memory while it is being madvised() */ -void *touch(void *unused) +void *touch(void __attribute__((unused)) *unused) { for (int i = 0; i < INLOOP_ITER; i++) huge_ptr[0] = '.'; @@ -41,7 +41,7 @@ void *touch(void *unused) return NULL; }
-void *madv(void *unused) +void *madv(void __attribute__((unused)) *unused) { for (int i = 0; i < INLOOP_ITER; i++) madvise(huge_ptr, mmap_size, MADV_DONTNEED); @@ -54,7 +54,7 @@ void *madv(void *unused) * The other hugepage should be flipping from used <-> reserved, because * of madvise(DONTNEED). */ -void *map_extra(void *unused) +void *map_extra(void __attribute__((unused)) *unused) { void *ptr;
diff --git a/tools/testing/selftests/mm/ksm_tests.c b/tools/testing/selftests/mm/ksm_tests.c index dcdd5bb20f3d8..323cfcb14e4d4 100644 --- a/tools/testing/selftests/mm/ksm_tests.c +++ b/tools/testing/selftests/mm/ksm_tests.c @@ -265,8 +265,7 @@ static int ksm_merge_pages(int merge_type, void *addr, size_t size, return 0; }
-static int ksm_unmerge_pages(void *addr, size_t size, - struct timespec start_time, int timeout) +static int ksm_unmerge_pages(void *addr, size_t size) { if (madvise(addr, size, MADV_UNMERGEABLE)) { perror("madvise"); @@ -483,7 +482,7 @@ static int get_first_mem_node(void) return get_next_mem_node(numa_max_node()); }
-static int check_ksm_numa_merge(int merge_type, int mapping, int prot, int timeout, +static int check_ksm_numa_merge(int merge_type, int timeout, bool merge_across_nodes, size_t page_size) { void *numa1_map_ptr, *numa2_map_ptr; @@ -547,8 +546,7 @@ static int check_ksm_numa_merge(int merge_type, int mapping, int prot, int timeo return KSFT_FAIL; }
-static int ksm_merge_hugepages_time(int merge_type, int mapping, int prot, - int timeout, size_t map_size) +static int ksm_merge_hugepages_time(int merge_type, int timeout, size_t map_size) { void *map_ptr, *map_ptr_orig; struct timespec start_time, end_time; @@ -678,7 +676,7 @@ static int ksm_unmerge_time(int merge_type, int mapping, int prot, int timeout, perror("clock_gettime"); goto err_out; } - if (ksm_unmerge_pages(map_ptr, map_size, start_time, timeout)) + if (ksm_unmerge_pages(map_ptr, map_size)) goto err_out; if (clock_gettime(CLOCK_MONOTONIC_RAW, &end_time)) { perror("clock_gettime"); @@ -906,8 +904,8 @@ int main(int argc, char *argv[]) page_size); break; case CHECK_KSM_NUMA_MERGE: - ret = check_ksm_numa_merge(merge_type, MAP_PRIVATE | MAP_ANONYMOUS, prot, - ksm_scan_limit_sec, merge_across_nodes, page_size); + ret = check_ksm_numa_merge(merge_type, ksm_scan_limit_sec, merge_across_nodes, + page_size); break; case KSM_MERGE_TIME: if (size_MB == 0) { @@ -922,8 +920,7 @@ int main(int argc, char *argv[]) printf("Option '-s' is required.\n"); return KSFT_FAIL; } - ret = ksm_merge_hugepages_time(merge_type, MAP_PRIVATE | MAP_ANONYMOUS, prot, - ksm_scan_limit_sec, size_MB); + ret = ksm_merge_hugepages_time(merge_type, ksm_scan_limit_sec, size_MB); break; case KSM_UNMERGE_TIME: if (size_MB == 0) { diff --git a/tools/testing/selftests/mm/memfd_secret.c b/tools/testing/selftests/mm/memfd_secret.c index b9659fa357371..f9d728e18678c 100644 --- a/tools/testing/selftests/mm/memfd_secret.c +++ b/tools/testing/selftests/mm/memfd_secret.c @@ -121,7 +121,7 @@ static void test_vmsplice(int fd, const char *desc) close(pipefd[1]); }
-static void try_process_vm_read(int fd, int pipefd[2]) +static void try_process_vm_read(int __attribute__((unused)) fd, int pipefd[2]) { struct iovec liov, riov; char buf[64]; @@ -145,7 +145,7 @@ static void try_process_vm_read(int fd, int pipefd[2]) exit(KSFT_FAIL); }
-static void try_ptrace(int fd, int pipefd[2]) +static void try_ptrace(int __attribute__((unused)) fd, int pipefd[2]) { pid_t ppid = getppid(); int status; diff --git a/tools/testing/selftests/mm/soft-dirty.c b/tools/testing/selftests/mm/soft-dirty.c index 7286c90fff1a3..b6eb5c4642ce5 100644 --- a/tools/testing/selftests/mm/soft-dirty.c +++ b/tools/testing/selftests/mm/soft-dirty.c @@ -74,7 +74,7 @@ static void test_vma_reuse(int pagemap_fd, int pagesize) munmap(map2, pagesize); }
-static void test_hugepage(int pagemap_fd, int pagesize) +static void test_hugepage(int pagemap_fd) { char *map; int i, ret; @@ -203,7 +203,7 @@ int main(void)
test_simple(pagemap_fd, pagesize); test_vma_reuse(pagemap_fd, pagesize); - test_hugepage(pagemap_fd, pagesize); + test_hugepage(pagemap_fd); test_mprotect_anon(pagemap_fd, pagesize); test_mprotect_file(pagemap_fd, pagesize);
diff --git a/tools/testing/selftests/mm/split_huge_page_test.c b/tools/testing/selftests/mm/split_huge_page_test.c index eb6d1b9fc3625..84b1251666aa1 100644 --- a/tools/testing/selftests/mm/split_huge_page_test.c +++ b/tools/testing/selftests/mm/split_huge_page_test.c @@ -103,7 +103,7 @@ static char *allocate_zero_filled_hugepage(size_t len) return result; }
-static void verify_rss_anon_split_huge_page_all_zeroes(char *one_page, int nr_hpages, size_t len) +static void verify_rss_anon_split_huge_page_all_zeroes(char *one_page, size_t len) { unsigned long rss_anon_before, rss_anon_after; size_t i; @@ -149,7 +149,7 @@ void split_pmd_zero_pages(void) size_t len = nr_hpages * pmd_pagesize;
one_page = allocate_zero_filled_hugepage(len); - verify_rss_anon_split_huge_page_all_zeroes(one_page, nr_hpages, len); + verify_rss_anon_split_huge_page_all_zeroes(one_page, len); printf("Split zero filled huge pages successful\n"); free(one_page); } diff --git a/tools/testing/selftests/mm/uffd-common.c b/tools/testing/selftests/mm/uffd-common.c index 717539eddf987..c15674a60f299 100644 --- a/tools/testing/selftests/mm/uffd-common.c +++ b/tools/testing/selftests/mm/uffd-common.c @@ -46,7 +46,7 @@ static void anon_release_pages(char *rel_area) err("madvise(MADV_DONTNEED) failed"); }
-static int anon_allocate_area(void **alloc_area, bool is_src) +static int anon_allocate_area(void **alloc_area, bool __attribute__((unused)) is_src) { *alloc_area = mmap(NULL, nr_pages * page_size, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); @@ -57,7 +57,9 @@ static int anon_allocate_area(void **alloc_area, bool is_src) return 0; }
-static void noop_alias_mapping(__u64 *start, size_t len, unsigned long offset) +static void noop_alias_mapping(__u64 __attribute__((unused)) *start, + size_t __attribute__((unused)) len, + unsigned long __attribute__((unused)) offset) { }
@@ -108,7 +110,8 @@ static int hugetlb_allocate_area(void **alloc_area, bool is_src) return 0; }
-static void hugetlb_alias_mapping(__u64 *start, size_t len, unsigned long offset) +static void hugetlb_alias_mapping(__u64 *start, size_t __attribute__((unused)) len, + unsigned long offset) { if (!map_shared) return; @@ -167,12 +170,13 @@ static int shmem_allocate_area(void **alloc_area, bool is_src) return 0; }
-static void shmem_alias_mapping(__u64 *start, size_t len, unsigned long offset) +static void shmem_alias_mapping(__u64 *start, size_t __attribute__((unused)) len, + unsigned long offset) { *start = (unsigned long)area_dst_alias + offset; }
-static void shmem_check_pmd_mapping(void *p, int expect_nr_hpages) +static void shmem_check_pmd_mapping(void __attribute__((unused)) *p, int expect_nr_hpages) { if (!check_huge_shmem(area_dst_alias, expect_nr_hpages, read_pmd_pagesize())) @@ -416,7 +420,7 @@ static void continue_range(int ufd, __u64 start, __u64 len, bool wp) ret, (int64_t) req.mapped); }
-int uffd_read_msg(int ufd, struct uffd_msg *msg) +int uffd_read_msg(struct uffd_msg *msg) { int ret = read(uffd, msg, sizeof(*msg));
@@ -537,7 +541,7 @@ void *uffd_poll_thread(void *arg) } if (!(pollfd[0].revents & POLLIN)) err("pollfd[0].revents %d", pollfd[0].revents); - if (uffd_read_msg(uffd, &msg)) + if (uffd_read_msg(&msg)) continue; switch (msg.event) { default: diff --git a/tools/testing/selftests/mm/uffd-common.h b/tools/testing/selftests/mm/uffd-common.h index a70ae10b5f620..4a5d5b37107c7 100644 --- a/tools/testing/selftests/mm/uffd-common.h +++ b/tools/testing/selftests/mm/uffd-common.h @@ -117,7 +117,7 @@ void uffd_stats_report(struct uffd_args *args, int n_cpus); int uffd_test_ctx_init(uint64_t features, const char **errmsg); void uffd_test_ctx_clear(void); int userfaultfd_open(uint64_t *features); -int uffd_read_msg(int ufd, struct uffd_msg *msg); +int uffd_read_msg(struct uffd_msg *msg); void wp_range(int ufd, __u64 start, __u64 len, bool wp); void uffd_handle_page_fault(struct uffd_msg *msg, struct uffd_args *args); int __copy_page(int ufd, unsigned long offset, bool retry, bool wp); diff --git a/tools/testing/selftests/mm/uffd-stress.c b/tools/testing/selftests/mm/uffd-stress.c index a4b83280998ab..1270ff3104cc6 100644 --- a/tools/testing/selftests/mm/uffd-stress.c +++ b/tools/testing/selftests/mm/uffd-stress.c @@ -136,7 +136,7 @@ static void *uffd_read_thread(void *arg) /* from here cancellation is ok */
for (;;) { - if (uffd_read_msg(uffd, &msg)) + if (uffd_read_msg(&msg)) continue; uffd_handle_page_fault(&msg, args); } diff --git a/tools/testing/selftests/mm/uffd-unit-tests.c b/tools/testing/selftests/mm/uffd-unit-tests.c index 9ff71fa1f9bf0..81b315bedb744 100644 --- a/tools/testing/selftests/mm/uffd-unit-tests.c +++ b/tools/testing/selftests/mm/uffd-unit-tests.c @@ -244,7 +244,7 @@ static void *fork_event_consumer(void *data) ready_for_fork = true;
/* Read until a full msg received */ - while (uffd_read_msg(args->parent_uffd, &msg)); + while (uffd_read_msg(&msg));
if (msg.event != UFFD_EVENT_FORK) err("wrong message: %u\n", msg.event); @@ -357,7 +357,7 @@ static int pagemap_test_fork(int uffd, bool with_event, bool test_pin) return result; }
-static void uffd_wp_unpopulated_test(uffd_test_args_t *args) +static void uffd_wp_unpopulated_test(uffd_test_args_t __attribute__((unused)) *args) { uint64_t value; int pagemap_fd; @@ -483,8 +483,7 @@ static void uffd_wp_fork_with_event_test(uffd_test_args_t *args) uffd_wp_fork_test_common(args, true); }
-static void uffd_wp_fork_pin_test_common(uffd_test_args_t *args, - bool with_event) +static void uffd_wp_fork_pin_test_common(bool with_event) { int pagemap_fd; pin_args pin_args = {}; @@ -535,14 +534,14 @@ static void uffd_wp_fork_pin_test_common(uffd_test_args_t *args, close(pagemap_fd); }
-static void uffd_wp_fork_pin_test(uffd_test_args_t *args) +static void uffd_wp_fork_pin_test(uffd_test_args_t __attribute__((unused)) *args) { - uffd_wp_fork_pin_test_common(args, false); + uffd_wp_fork_pin_test_common(false); }
-static void uffd_wp_fork_pin_with_event_test(uffd_test_args_t *args) +static void uffd_wp_fork_pin_with_event_test(uffd_test_args_t __attribute__((unused)) *args) { - uffd_wp_fork_pin_test_common(args, true); + uffd_wp_fork_pin_test_common(true); }
static void check_memory_contents(char *p) @@ -627,24 +626,25 @@ static void uffd_minor_test_common(bool test_collapse, bool test_wp) uffd_test_pass(); }
-void uffd_minor_test(uffd_test_args_t *args) +void uffd_minor_test(uffd_test_args_t __attribute__((unused)) *args) { uffd_minor_test_common(false, false); }
-void uffd_minor_wp_test(uffd_test_args_t *args) +void uffd_minor_wp_test(uffd_test_args_t __attribute__((unused)) *args) { uffd_minor_test_common(false, true); }
-void uffd_minor_collapse_test(uffd_test_args_t *args) +void uffd_minor_collapse_test(uffd_test_args_t __attribute__((unused)) *args) { uffd_minor_test_common(true, false); }
static sigjmp_buf jbuf, *sigbuf;
-static void sighndl(int sig, siginfo_t *siginfo, void *ptr) +static void sighndl(int sig, siginfo_t __attribute__((unused)) *siginfo, + void __attribute__((unused)) *ptr) { if (sig == SIGBUS) { if (sigbuf) @@ -820,12 +820,12 @@ static void uffd_sigbus_test_common(bool wp) uffd_test_pass(); }
-static void uffd_sigbus_test(uffd_test_args_t *args) +static void uffd_sigbus_test(uffd_test_args_t __attribute__((unused)) *args) { uffd_sigbus_test_common(false); }
-static void uffd_sigbus_wp_test(uffd_test_args_t *args) +static void uffd_sigbus_wp_test(uffd_test_args_t __attribute__((unused)) *args) { uffd_sigbus_test_common(true); } @@ -873,12 +873,12 @@ static void uffd_events_test_common(bool wp) uffd_test_pass(); }
-static void uffd_events_test(uffd_test_args_t *args) +static void uffd_events_test(uffd_test_args_t __attribute__((unused)) *args) { uffd_events_test_common(false); }
-static void uffd_events_wp_test(uffd_test_args_t *args) +static void uffd_events_wp_test(uffd_test_args_t __attribute__((unused)) *args) { uffd_events_test_common(true); } @@ -946,7 +946,7 @@ uffd_register_detect_zeropage(int uffd, void *addr, uint64_t len) }
/* exercise UFFDIO_ZEROPAGE */ -static void uffd_zeropage_test(uffd_test_args_t *args) +static void uffd_zeropage_test(uffd_test_args_t __attribute__((unused)) *args) { bool has_zeropage; int i; @@ -1002,7 +1002,7 @@ static void do_uffdio_poison(int uffd, unsigned long offset) }
static void uffd_poison_handle_fault( - struct uffd_msg *msg, struct uffd_args *args) + struct uffd_msg *msg, struct uffd_args __attribute__((unused)) *args) { unsigned long offset;
@@ -1023,7 +1023,7 @@ static void uffd_poison_handle_fault( do_uffdio_poison(uffd, offset); }
-static void uffd_poison_test(uffd_test_args_t *targs) +static void uffd_poison_test(uffd_test_args_t __attribute__((unused)) *targs) { pthread_t uffd_mon; char c; @@ -1114,7 +1114,7 @@ static void uffd_move_pmd_handle_fault(struct uffd_msg *msg, }
static void -uffd_move_test_common(uffd_test_args_t *targs, unsigned long chunk_size, +uffd_move_test_common(unsigned long chunk_size, void (*handle_fault)(struct uffd_msg *msg, struct uffd_args *args)) { unsigned long nr; @@ -1206,24 +1206,24 @@ uffd_move_test_common(uffd_test_args_t *targs, unsigned long chunk_size, uffd_test_pass(); }
-static void uffd_move_test(uffd_test_args_t *targs) +static void uffd_move_test(uffd_test_args_t __attribute__((unused)) *targs) { - uffd_move_test_common(targs, page_size, uffd_move_handle_fault); + uffd_move_test_common(page_size, uffd_move_handle_fault); }
-static void uffd_move_pmd_test(uffd_test_args_t *targs) +static void uffd_move_pmd_test(uffd_test_args_t __attribute__((unused)) *targs) { if (madvise(area_dst, nr_pages * page_size, MADV_HUGEPAGE)) err("madvise(MADV_HUGEPAGE) failure"); - uffd_move_test_common(targs, read_pmd_pagesize(), + uffd_move_test_common(read_pmd_pagesize(), uffd_move_pmd_handle_fault); }
-static void uffd_move_pmd_split_test(uffd_test_args_t *targs) +static void uffd_move_pmd_split_test(uffd_test_args_t __attribute__((unused)) *targs) { if (madvise(area_dst, nr_pages * page_size, MADV_NOHUGEPAGE)) err("madvise(MADV_NOHUGEPAGE) failure"); - uffd_move_test_common(targs, read_pmd_pagesize(), + uffd_move_test_common(read_pmd_pagesize(), uffd_move_pmd_handle_fault); }
Fix unused parameter warnings.
Signed-off-by: Muhammad Usama Anjum usama.anjum@collabora.com --- tools/testing/selftests/mm/pkey-x86.h | 4 +++- .../selftests/mm/pkey_sighandler_tests.c | 17 +++++++++++------ tools/testing/selftests/mm/protection_keys.c | 18 ++++++++++-------- 3 files changed, 24 insertions(+), 15 deletions(-)
diff --git a/tools/testing/selftests/mm/pkey-x86.h b/tools/testing/selftests/mm/pkey-x86.h index f7ecd335df1e6..75cef8ee00702 100644 --- a/tools/testing/selftests/mm/pkey-x86.h +++ b/tools/testing/selftests/mm/pkey-x86.h @@ -157,7 +157,9 @@ static inline void expect_fault_on_read_execonly_key(void *p1, int pkey) expected_pkey_fault(pkey); }
-static inline void *malloc_pkey_with_mprotect_subpage(long size, int prot, u16 pkey) +static inline void *malloc_pkey_with_mprotect_subpage(long __attribute__((unused)) size, + int __attribute__((unused)) prot, + u16 __attribute__((unused)) pkey) { return PTR_ERR_ENOTSUP; } diff --git a/tools/testing/selftests/mm/pkey_sighandler_tests.c b/tools/testing/selftests/mm/pkey_sighandler_tests.c index 249989f8b7a2a..cd46528d6c215 100644 --- a/tools/testing/selftests/mm/pkey_sighandler_tests.c +++ b/tools/testing/selftests/mm/pkey_sighandler_tests.c @@ -42,7 +42,8 @@ static siginfo_t siginfo = {0}; * which is protected by MPK 0 which we don't have access to. */ static inline __always_inline -long syscall_raw(long n, long a1, long a2, long a3, long a4, long a5, long a6) +long syscall_raw(long n, long a1, long a2, long a3, long a4, long a5, + long __attribute__((unused)) a6) { unsigned long ret; #ifdef __x86_64__ @@ -110,7 +111,8 @@ static inline u64 pkey_reg_restrictive_default(void) return set_pkey_bits(PKEY_REG_ALLOW_NONE, 0, PKEY_DISABLE_ACCESS); }
-static void sigsegv_handler(int signo, siginfo_t *info, void *ucontext) +static void sigsegv_handler(int __attribute__((unused)) signo, siginfo_t *info, + void __attribute__((unused)) *ucontext) { pthread_mutex_lock(&mutex);
@@ -122,7 +124,8 @@ static void sigsegv_handler(int signo, siginfo_t *info, void *ucontext) syscall_raw(SYS_exit, 0, 0, 0, 0, 0, 0); }
-static void sigusr1_handler(int signo, siginfo_t *info, void *ucontext) +static void sigusr1_handler(int __attribute__((unused)) signo, siginfo_t *info, + void __attribute__((unused)) *ucontext) { pthread_mutex_lock(&mutex);
@@ -132,7 +135,9 @@ static void sigusr1_handler(int signo, siginfo_t *info, void *ucontext) pthread_mutex_unlock(&mutex); }
-static void sigusr2_handler(int signo, siginfo_t *info, void *ucontext) +static void sigusr2_handler(int __attribute__((unused)) signo, + siginfo_t __attribute__((unused)) *info, + void __attribute__((unused)) *ucontext) { /* * pkru should be the init_pkru value which enabled MPK 0 so @@ -155,7 +160,7 @@ static void raise_sigusr2(void) */ }
-static void *thread_segv_with_pkey0_disabled(void *ptr) +static void *thread_segv_with_pkey0_disabled(void __attribute__((unused)) *ptr) { /* Disable MPK 0 (and all others too) */ __write_pkey_reg(pkey_reg_restrictive_default()); @@ -165,7 +170,7 @@ static void *thread_segv_with_pkey0_disabled(void *ptr) return NULL; }
-static void *thread_segv_pkuerr_stack(void *ptr) +static void *thread_segv_pkuerr_stack(void __attribute__((unused)) *ptr) { /* Disable MPK 0 (and all others too) */ __write_pkey_reg(pkey_reg_restrictive_default()); diff --git a/tools/testing/selftests/mm/protection_keys.c b/tools/testing/selftests/mm/protection_keys.c index a4683f2476f27..3a66798a8e8d6 100644 --- a/tools/testing/selftests/mm/protection_keys.c +++ b/tools/testing/selftests/mm/protection_keys.c @@ -309,7 +309,7 @@ static char *si_code_str(int si_code)
static int pkey_faults; static int last_si_pkey = -1; -static void signal_handler(int signum, siginfo_t *si, void *vucontext) +static void signal_handler(int __attribute__((unused)) signum, siginfo_t *si, void *vucontext) { ucontext_t *uctxt = vucontext; int trapno; @@ -891,7 +891,7 @@ static void close_test_fds(void) nr_test_fds = 0; }
-static void test_pkey_alloc_free_attach_pkey0(int *ptr, u16 pkey) +static void test_pkey_alloc_free_attach_pkey0(int *ptr, u16 __attribute__((unused)) pkey) { int i, err; int max_nr_pkey_allocs; @@ -1108,7 +1108,7 @@ static void test_pkey_syscalls_on_non_allocated_pkey(int *ptr, u16 pkey) }
/* Assumes that all pkeys other than 'pkey' are unallocated */ -static void test_pkey_syscalls_bad_args(int *ptr, u16 pkey) +static void test_pkey_syscalls_bad_args(int *ptr, u16 __attribute__((unused)) pkey) { int err; int bad_pkey = NR_PKEYS+99; @@ -1134,7 +1134,7 @@ static void become_child(void) }
/* Assumes that all pkeys other than 'pkey' are unallocated */ -static void test_pkey_alloc_exhaust(int *ptr, u16 pkey) +static void test_pkey_alloc_exhaust(int __attribute__((unused)) *ptr, u16 __attribute__((unused)) pkey) { int err; int allocated_pkeys[NR_PKEYS] = {0}; @@ -1240,7 +1240,7 @@ static void arch_force_pkey_reg_init(void) * a long-running test that continually checks the pkey * register. */ -static void test_pkey_init_state(int *ptr, u16 pkey) +static void test_pkey_init_state(int __attribute__((unused)) *ptr, u16 __attribute__((unused)) pkey) { int err; int allocated_pkeys[NR_PKEYS] = {0}; @@ -1399,7 +1399,7 @@ static void *get_pointer_to_instructions(void) return p1; }
-static void test_executing_on_unreadable_memory(int *ptr, u16 pkey) +static void test_executing_on_unreadable_memory(int __attribute__((unused)) *ptr, u16 pkey) { void *p1; int scratch; @@ -1431,7 +1431,8 @@ static void test_executing_on_unreadable_memory(int *ptr, u16 pkey) pkey_assert(!ret); }
-static void test_implicit_mprotect_exec_only_memory(int *ptr, u16 pkey) +static void test_implicit_mprotect_exec_only_memory(int __attribute__((unused)) *ptr, + u16 __attribute__((unused)) pkey) { void *p1; int scratch; @@ -1480,7 +1481,8 @@ static void test_implicit_mprotect_exec_only_memory(int *ptr, u16 pkey) }
#if defined(__i386__) || defined(__x86_64__) -static void test_ptrace_modifies_pkru(int *ptr, u16 pkey) +static void test_ptrace_modifies_pkru(int __attribute__((unused)) *ptr, + u16 __attribute__((unused)) pkey) { u32 new_pkru; pid_t child;
Fix type mismatch warnings in different tests.
Signed-off-by: Muhammad Usama Anjum usama.anjum@collabora.com --- tools/testing/selftests/mm/compaction_test.c | 2 +- tools/testing/selftests/mm/gup_longterm.c | 3 ++- tools/testing/selftests/mm/hugetlb_dio.c | 2 +- tools/testing/selftests/mm/hugetlb_fault_after_madv.c | 2 +- tools/testing/selftests/mm/hugetlb_madv_vs_map.c | 2 +- tools/testing/selftests/mm/ksm_functional_tests.c | 6 +++--- tools/testing/selftests/mm/mlock-random-test.c | 4 ++-- tools/testing/selftests/mm/pkey_sighandler_tests.c | 2 +- tools/testing/selftests/mm/soft-dirty.c | 2 +- 9 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/tools/testing/selftests/mm/compaction_test.c b/tools/testing/selftests/mm/compaction_test.c index 8d23b698ce9db..f6f32a5732e9e 100644 --- a/tools/testing/selftests/mm/compaction_test.c +++ b/tools/testing/selftests/mm/compaction_test.c @@ -134,7 +134,7 @@ int check_compaction(unsigned long mem_free, unsigned long hugepage_size, lseek(fd, 0, SEEK_SET);
if (write(fd, init_nr_hugepages, strlen(init_nr_hugepages)) - != strlen(init_nr_hugepages)) { + != (signed long int)strlen(init_nr_hugepages)) { ksft_print_msg("Failed to write value to /proc/sys/vm/nr_hugepages: %s\n", strerror(errno)); goto close_fd; diff --git a/tools/testing/selftests/mm/gup_longterm.c b/tools/testing/selftests/mm/gup_longterm.c index 03a31dcb57577..7f1b4ad7fcaec 100644 --- a/tools/testing/selftests/mm/gup_longterm.c +++ b/tools/testing/selftests/mm/gup_longterm.c @@ -446,7 +446,8 @@ static int tests_per_test_case(void)
int main(void) { - int i, err; + unsigned int i; + int err;
pagesize = getpagesize(); nr_hugetlbsizes = detect_hugetlb_page_sizes(hugetlbsizes, diff --git a/tools/testing/selftests/mm/hugetlb_dio.c b/tools/testing/selftests/mm/hugetlb_dio.c index db63abe5ee5e8..62f368d4c8c16 100644 --- a/tools/testing/selftests/mm/hugetlb_dio.c +++ b/tools/testing/selftests/mm/hugetlb_dio.c @@ -63,7 +63,7 @@ void run_dio_using_hugetlb(unsigned int start_off, unsigned int end_off) memset(buffer, 'A', writesize);
/* Write the buffer to the file */ - if (write(fd, buffer, writesize) != (writesize)) { + if (write(fd, buffer, writesize) != (signed int)writesize) { munmap(orig_buffer, h_pagesize); close(fd); ksft_exit_fail_perror("Error writing to file\n"); diff --git a/tools/testing/selftests/mm/hugetlb_fault_after_madv.c b/tools/testing/selftests/mm/hugetlb_fault_after_madv.c index e62f4e1388f26..2b5acb13ee0be 100644 --- a/tools/testing/selftests/mm/hugetlb_fault_after_madv.c +++ b/tools/testing/selftests/mm/hugetlb_fault_after_madv.c @@ -88,7 +88,7 @@ int main(void) MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB, -1, 0);
- if ((unsigned long)huge_ptr == -1) + if (huge_ptr == MAP_FAILED) ksft_exit_skip("Failed to allocated huge page\n");
pthread_create(&thread1, NULL, madv, NULL); diff --git a/tools/testing/selftests/mm/hugetlb_madv_vs_map.c b/tools/testing/selftests/mm/hugetlb_madv_vs_map.c index 6c326cf3dcf6b..eda38b63e9e8d 100644 --- a/tools/testing/selftests/mm/hugetlb_madv_vs_map.c +++ b/tools/testing/selftests/mm/hugetlb_madv_vs_map.c @@ -100,7 +100,7 @@ int main(void) MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB, -1, 0);
- if ((unsigned long)huge_ptr == -1) { + if (huge_ptr == MAP_FAILED) { ksft_test_result_fail("Failed to allocate huge page\n"); return KSFT_FAIL; } diff --git a/tools/testing/selftests/mm/ksm_functional_tests.c b/tools/testing/selftests/mm/ksm_functional_tests.c index 66b4e111b5a27..4f96126e4e1f9 100644 --- a/tools/testing/selftests/mm/ksm_functional_tests.c +++ b/tools/testing/selftests/mm/ksm_functional_tests.c @@ -306,7 +306,7 @@ static void test_unmerge_zero_pages(void)
/* Check if ksm_zero_pages is updated correctly after KSM merging */ pages_expected = size / pagesize; - if (pages_expected != get_my_ksm_zero_pages()) { + if ((signed long)pages_expected != get_my_ksm_zero_pages()) { ksft_test_result_fail("'ksm_zero_pages' updated after merging\n"); goto unmap; } @@ -319,7 +319,7 @@ static void test_unmerge_zero_pages(void)
/* Check if ksm_zero_pages is updated correctly after unmerging */ pages_expected /= 2; - if (pages_expected != get_my_ksm_zero_pages()) { + if ((signed long)pages_expected != get_my_ksm_zero_pages()) { ksft_test_result_fail("'ksm_zero_pages' updated after unmerging\n"); goto unmap; } @@ -625,7 +625,7 @@ static void test_prot_none(void) { const unsigned int size = 2 * MiB; char *map; - int i; + unsigned int i;
ksft_print_msg("[RUN] %s\n", __func__);
diff --git a/tools/testing/selftests/mm/mlock-random-test.c b/tools/testing/selftests/mm/mlock-random-test.c index 0d95d630d0450..f410699458f2a 100644 --- a/tools/testing/selftests/mm/mlock-random-test.c +++ b/tools/testing/selftests/mm/mlock-random-test.c @@ -138,7 +138,7 @@ static void test_mlock_within_limit(char *p, int alloc_size) int page_size = 0;
getrlimit(RLIMIT_MEMLOCK, &cur); - if (cur.rlim_cur < alloc_size) + if (cur.rlim_cur < (unsigned int)alloc_size) ksft_exit_fail_msg("alloc_size[%d] < %u rlimit,lead to mlock failure\n", alloc_size, (unsigned int)cur.rlim_cur);
@@ -204,7 +204,7 @@ static void test_mlock_outof_limit(char *p, int alloc_size) struct rlimit cur;
getrlimit(RLIMIT_MEMLOCK, &cur); - if (cur.rlim_cur >= alloc_size) + if (cur.rlim_cur >= (unsigned int)alloc_size) ksft_exit_fail_msg("alloc_size[%d] >%u rlimit, violates test condition\n", alloc_size, (unsigned int)cur.rlim_cur);
diff --git a/tools/testing/selftests/mm/pkey_sighandler_tests.c b/tools/testing/selftests/mm/pkey_sighandler_tests.c index cd46528d6c215..89c0f4e090374 100644 --- a/tools/testing/selftests/mm/pkey_sighandler_tests.c +++ b/tools/testing/selftests/mm/pkey_sighandler_tests.c @@ -535,7 +535,7 @@ static void (*pkey_tests[])(void) = {
int main(void) { - int i; + unsigned int i;
ksft_print_header(); ksft_set_plan(ARRAY_SIZE(pkey_tests)); diff --git a/tools/testing/selftests/mm/soft-dirty.c b/tools/testing/selftests/mm/soft-dirty.c index b6eb5c4642ce5..68edb2475ccd4 100644 --- a/tools/testing/selftests/mm/soft-dirty.c +++ b/tools/testing/selftests/mm/soft-dirty.c @@ -77,7 +77,7 @@ static void test_vma_reuse(int pagemap_fd, int pagesize) static void test_hugepage(int pagemap_fd) { char *map; - int i, ret; + unsigned int i, ret; size_t hpage_len = read_pmd_pagesize();
if (!hpage_len)
Found warnings through hmm-tests and mdwe_test.
Fix following warnings: - Mark unused variable with unused attribute - __EXPECT is causing types mismatch warnings when __exp is unsigned and _seen is equal to a constant number, __typeof__(_seen) returns signed type.
hmm-tests.c: In function ‘hmm_anon_read’: ../kselftest_harness.h:523:52: warning: comparison of integer expressions of different signedness: ‘long unsigned int’ and ‘int’ [-Wsign-compare] 523 | __EXPECT(expected, #expected, seen, #seen, !=, 1) | ^~ ../kselftest_harness.h:759:21: note: in definition of macro ‘__EXPECT’ 759 | if (!(__exp _t __seen)) { \ | ^~ hmm-tests.c:303:9: note: in expansion of macro ‘ASSERT_NE’ 303 | ASSERT_NE(npages, 0); | ^~~~~~~~~ - Mark variant as unused: mdwe_test.c: In function ‘wrapper_prctl_flags’: ../kselftest_harness.h:177:52: warning: unused parameter ‘variant’ [-Wunused-parameter] 177 | struct __fixture_variant_metadata *variant) \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ ../kselftest_harness.h:152:25: note: in expansion of macro ‘__TEST_IMPL’ 152 | #define TEST(test_name) __TEST_IMPL(test_name, -1) | ^~~~~~~~~~~ mdwe_test.c:23:1: note: in expansion of macro ‘TEST’ 23 | TEST(prctl_flags) | ^~~~
Signed-off-by: Muhammad Usama Anjum usama.anjum@collabora.com --- tools/testing/selftests/kselftest_harness.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/kselftest_harness.h b/tools/testing/selftests/kselftest_harness.h index 666c9fde76da9..76e6b3be0e9d6 100644 --- a/tools/testing/selftests/kselftest_harness.h +++ b/tools/testing/selftests/kselftest_harness.h @@ -174,7 +174,7 @@ static void test_name(struct __test_metadata *_metadata); \ static inline void wrapper_##test_name( \ struct __test_metadata *_metadata, \ - struct __fixture_variant_metadata *variant) \ + struct __fixture_variant_metadata __attribute__((unused)) *variant) \ { \ _metadata->setup_completed = true; \ if (setjmp(_metadata->env) == 0) \ @@ -756,7 +756,7 @@ /* Avoid multiple evaluation of the cases */ \ __typeof__(_expected) __exp = (_expected); \ __typeof__(_seen) __seen = (_seen); \ - if (!(__exp _t __seen)) { \ + if (!(__exp _t (__typeof__(_expected)) __seen)) { \ /* Report with actual signedness to avoid weird output. */ \ switch (is_signed_type(__exp) * 2 + is_signed_type(__seen)) { \ case 0: { \ @@ -965,7 +965,7 @@ static inline void __test_check_assert(struct __test_metadata *t) }
struct __test_metadata *__active_test; -static void __timeout_handler(int sig, siginfo_t *info, void *ucontext) +static void __timeout_handler(int sig, siginfo_t *info, void __attribute__((unused)) *ucontext) { struct __test_metadata *t = __active_test;
On Thu, Jan 09, 2025 at 10:38:31PM +0500, Muhammad Usama Anjum wrote:
Found warnings through hmm-tests and mdwe_test.
Fix following warnings:
- Mark unused variable with unused attribute
- __EXPECT is causing types mismatch warnings when __exp is unsigned and _seen is equal to a constant number, __typeof__(_seen) returns signed type.
This patch, which is in -next as a07b5ab38aad, breaks the arm64 pac test pac_instructions_not_nop_generic:
https://lava.sirena.org.uk/scheduler/job/1065981#L2147
(in spite of the subject line it affects all users of the kselftest harness, not just the mm tests).
@@ -756,7 +756,7 @@ /* Avoid multiple evaluation of the cases */ \ __typeof__(_expected) __exp = (_expected); \ __typeof__(_seen) __seen = (_seen); \
- if (!(__exp _t __seen)) { \
- if (!(__exp _t (__typeof__(_expected)) __seen)) { \ /* Report with actual signedness to avoid weird output. */ \ switch (is_signed_type(__exp) * 2 + is_signed_type(__seen)) { \ case 0: { \
I *believe* it's this change, which seems a bit suspicous but I didn't nail down the exact failure mode (the failing test compares a constant 0 to a size_t). It's not clear to me why a cast is appropriate here, the warning I think this was supposed to address was:
hmm-tests.c: In function ‘hmm_anon_read’: ../kselftest_harness.h:523:52: warning: comparison of integer expressions of different signedness: ‘long unsigned int’ and ‘int’ [-Wsign-compare]
...
hmm-tests.c:303:9: note: in expansion of macro ‘ASSERT_NE’ 303 | ASSERT_NE(npages, 0);
which is a similar comparison of 0 with a signed value but with the position of the constant reversed. It's not clear to me that the warning isn't legitimate, or that a cast blindly done on one argument is the appropriate way to address it. AFAICT the issue comes because of the dance the macro does to copy the arguments into a variable to avoid multiple evaluations, which defeats the magic C has for assigning a type to bare constants. I think either the macro needs to be more clever (and legibility challenged) or we should do any casting of constants that's needed to shut warnings up in callers.
In any case, failing tests seem obviously worse than a build warning.
Bisect log, there's huge numbers of good commits at the start since my automation feeds in the results of any test results it already has for commits in the bisected range in order to avoid duplicate work:
# bad: [e7bb221a638962d487231ac45a6699fb9bb8f9fa] Add linux-next specific files for 20250115 # good: [7b90deb712bbacdf8aa1fc01bf155cab5c21d98a] Merge branch 'for-linux-next-fixes' of https://gitlab.freedesktop.org/drm/misc/kernel.git # good: [6b077230a1e163f01c866923915def6f73f9c390] ASoC: fsl: Support micfil on i.MX943 # good: [e896c04890aeff2292364c19632fc15d890d436c] spi: amd: Fix -Wuninitialized in amd_spi_exec_mem_op() # good: [41f1d2bd4998829341cdada022ede610068a0f33] ASoC: soc-dapm: remove !card check from snd_soc_dapm_set_bias_level() # good: [40ba3c9019ccd34d576fa14f94ef4f3bd9284c1a] spi: ti-qspi: Use syscon_regmap_lookup_by_phandle_args # good: [eab69050450ba63a4edb17d3d1a8654d2a130786] ASoC: fsl_micfil: Add i.MX943 platform support # good: [3927c51e49c1a45785334dc578f0b29c685619ec] ASoC: dt-bindings: fsl,micfil: Add compatible string for i.MX943 platform # good: [9a8afbe5677234ac2490438d6b8ab74ee7fb359e] spi-nand/spi-mem DTR support # good: [65880d32e1d7eb1ef03253c454fcd8f9d41aaa09] ASoC: sun4i-codec: Use new devm clk and reset APIs # good: [292284f2be46514ed07e7b3e3350329f656c4f62] ASoC: fsl: Support MQS on i.MX943 # good: [9d499259db0cc5a31e212570c2cf945ad117b900] ASoC: extra format on each DAI # good: [8eb27b5758e6fb6d1881413e3f1159c579ac48b3] ASoC: codecs: Use ARRAY_SIZE() to calculate PEB2466_TLV_SIZE # good: [7299cc06fe4ab2ac26af73ac5fecd35a28fef527] ASoC: SOF: Intel: Use str_yes_no() to improve bdw_dump() # good: [5f281c3e82b1203c40cf6ead009ffb5b09db056b] ASoC: audio-graph-card2: use __free(device_node) for device node # good: [c8903242bcb119660232c9cbf336fea3737d1a60] ASoC: soc-core: return 0 if np was NULL on snd_soc_daifmt_parse_clock_provider_raw() # good: [85dc053c87bcc32afd8e5cbf20a649dc24e93d24] ASoC: audio-graph-card2: use of_graph_get_port_by_id() at graph_get_next_multi_ep() # good: [365865b7d7467aea9767ea18670198921bcada7c] ASoC: audio-graph-card2: Use extra format on each DAI # good: [c8a1dccf449eb71b23b6c04ff6b40db568d7cf92] ASoC: audio-graph-card: use __free(device_node) for device node # good: [24410f499e808884cc91239dc16013e5bee8779a] ASoC: soc-core: Enable to use extra format on each DAI # good: [2518a0e1b878042f9afa45ae063e544a16efc1a3] ASoC: simple-card: use __free(device_node) for device node # good: [6f490e6b2c34792e363685bacb48a759e7e40cd1] ASoC: fsl_mqs: Add i.MX943 platform support # good: [a1a771e5f1e31e4764d9a225c02e93969d3f5389] ASoC: dt-bindings: fsl,mqs: Add compatible string for i.MX943 platform # good: [e8d06511ee70175a58be450a098ab1ce37fe9ecb] Merge branch kvm-arm64/coresight-6.14 into kvmarm-master/next # good: [4e26de25d2b617e12bba98e11393fdf7c27885f9] Merge remote-tracking branch 'arm64/for-next/cpufeature' into kvm-arm64/pkvm-fixed-features-6.14 # good: [6f91d31d47c57953da68e1a91240ae2543b00172] KVM: arm64: Drop pkvm_mem_transition for host/hyp donations # good: [38138762faffeb923d9f49efbcc09884f1530786] tools: arm64: Update sysreg.h header files # good: [d0670128d42fa170bf8ba878cd23504c5c5cccc7] Merge branch kvm-arm64/pkvm-np-guest into kvmarm-master/next # good: [e880b16efb78f9c7449239a76814aeb015daf2a1] Merge branch kvm-arm64/pkvm-fixed-features-6.14 into kvmarm-master/next # good: [8fd113c6ba2490e4ce38447a596ab448eeb1a1f4] Merge branch kvm-arm64/misc-6.14 into kvmarm-master/next # good: [17b99c04d9b48465d45b0913fa78a6859b0b24c5] Merge branch kvm-arm64/pkvm-memshare-declutter into kvmarm-master/next # good: [a2b579c41fe9c295804abd167751f9fdc73c7006] coresight: trbe: Remove redundant disable call # good: [c382ee674c8b5005798606267d660cf995218b18] arm64/sysreg/tools: Move TRFCR definitions to sysreg # good: [226d6cb3cb799aae46d0dd19a521133997d9db11] spi: spi-mem: Estimate the time taken by operations # good: [fd85b6b7bc53409d0be82763419bdcdaa48f2c91] spi: Add spi_mem_calc_op_duration() helper # good: [89b37e49929653b7c350aac7fb2b96a052533015] spi-nand/spi-mem DTR support # good: [abea0cbfba5848d11b6364e82df4864fd0bfa683] ASoC: simple-card: Drop unnecessary "dai-tdm-slot-width-map" property presence check # good: [2438db5253eb17a7c0ccb15aea4252a150dda057] spi: fsl-qspi: Support per spi-mem operation frequency switches # good: [26851cf65ffca2d3a8d529a125e54cf0084d69e7] spi: nxp-fspi: Support per spi-mem operation frequency switches # good: [d3f35dd3ad968256ed1080e3ea2022f947861cff] spi: rockchip-sfc: Support per spi-mem operation frequency switches # good: [67707cb094f134f5b3931eefbedbb9ca7e3209d0] spi: mxic: Support per spi-mem operation frequency switches # good: [d1f85873d2d62d6980e68d21d3a21f20b0664cc3] spi: spi-mem: Reorder spi-mem macro assignments # good: [13529647743d906ed3cf991f1d77727e7ff1fb6f] spi: microchip-core-qspi: Support per spi-mem operation frequency switches # good: [5baa189789e8894c58eacc7803e3c163c1d0fc0a] spi: amlogic-spifc-a1: Support per spi-mem operation frequency switches # good: [b2fac3192919dd07e7ce30558e34abd7e07dde77] spi: spi-ti-qspi: Support per spi-mem operation frequency switches # good: [1248c9b8d54120950fda10fbeb98fb8932b4d45c] spi: spi-mem: Add a new controller capability # good: [eee7bc9e7ade6f7ac17d9ec02887cd5509ba9427] spi: dw: Support per spi-mem operation frequency switches # good: [13fd04b53053bbfa741a0f2a781837ab80e485f6] spi: mt65xx: Support per spi-mem operation frequency switches # good: [1a206344218cc15ad8f321e3abab3f3d36ab639f] spi: spi-sn-f-ospi: Support per spi-mem operation frequency switches # good: [e6204f39fe3a7b4538815a2d778b601bd543649e] spi: amd: Drop redundant check # good: [0fefeade90e74bc8f40ab0e460f483565c492e28] spi: spi-mem: Extend spi-mem operations with a per-operation maximum frequency # good: [d0e5faccb229b1dacc4c9fa11f6df33bb1fdabd8] spi: amd: Support per spi-mem operation frequency switches # good: [30eb2e6e78225f92f04a2325c6fd77fe8f5b4aab] spi: zynqmp-gqspi: Support per spi-mem operation frequency switches # good: [84eac6d478c00f8f9101f91716ea3866d2fc1e54] ASoC: Use of_property_present() for non-boolean properties # good: [9a68f6c8d6cfddeac7c5874528ed04e50a1cb579] spi: zynq-qspi: Support per spi-mem operation frequency switches # good: [06e9f5a1f6ba774d8942a168d3ec5ed5a008fbcb] spi: cadence-qspi: Support per spi-mem operation frequency switches # good: [f0006897a96c736623ddeb9b68c3880eb5cdebe7] spi: spi-mem: Create macros for DTR operation # good: [61aff2da3e63a43f22e60aa1bc57026ce07d189e] ASoC: intel: remove disable_route_checks # good: [dd2395162c07e4102fc83878dc394ff63f2eaae8] ASoC: remove disable_route_checks # good: [fd688ce125a4ff5cc2b6be1184dc17c9f342db37] ASoC: Intel: avs: Fixes and cleanups # good: [7e24ec93aecd12e33d31e38e5af4625553bbc727] ASoC: amd: Add ACPI dependency to fix build error # good: [9c0e29b9957e407af6197ff1fb48f365a9b0c248] ASoC: remove disable_route_checks # good: [c3ad22ad34f81a8906dba02ea8cc9756d2ce7b50] regulator: core: Resolve supply using of_node from regulator_config # good: [cf4d74256fe103ece7b2647550e6c063048e5682] ASoC: Intel: avs: Fix theoretical infinite loop # good: [e9ca3db9f01a7ce91ceab35cd5fa52f0c5aca174] ASoC: Intel: avs: Fix init-config parsing # good: [33228036ff655ebed1bc4bde9c9b6329b569b27b] ASoC: Intel: avs: Print IPC error messages in lower layer # good: [e3146775f05d18c667a2e26082da3ac105f87d9f] ASoC: Intel: avs: Update hda component teardown sequences # good: [bca0fa5f6b5e96c03daac1ed62b1e5c5057a2048] ASoC: Intel: avs: Do not readq() u32 registers # good: [5e56618e1593a9eb9d72dc9433ac7a02a6c48c8f] spi: atmel-quadspi: Update to current device naming terminology # good: [5640fd07b90ed43225704fecfbbda9d402dba1cf] spi: Merge up v6.13-rc6 # good: [636ee5781d259258dc9425a5552be1ffa458633c] spi: fsl-spi: Remove display of virtual address # good: [dbda5c35b88794f6e5efe1b5b20044b0b3a340d4] ASoC: Intel: avs: Fix the minimum firmware version numbers # good: [aea305d28551bc213aab3a41a0f59412247ae2b4] ASoC: Intel: avs: Update ASRC definition # good: [3eede0fc99c684df6f3f35866761036dabf89d05] ASoC: Intel: avs: Adjust DSP status register names # good: [94aa347d34e079859a5378272c9452c728e4183a] ASoC: Intel: avs: Add MODULE_FIRMWARE to inform about FW # good: [480d9bb9cfb7b774b22cf82ff21903eb50d64cb9] ASoC: Intel: avs: Improve logging of firmware loading # good: [0ca529926c5d9d0a3c0b1609fb7034ab870e4770] ASoC: Intel: avs: Clearly state assumptions of hw_params() # good: [0b12850ddfb0032376ef1be10b5b46be00bba4d4] ASoC: Intel: avs: Add missing includes # good: [ef724707788325a53ffa4cf58fceb94654e4793a] ASoC: Intel: avs: Adjust IPC traces # good: [3566784817aeb1a733c95953998a29adc386d2ff] drm/i915/display: Update DBUF_TRACKER_STATE_SERVICE only on appropriate platforms # good: [9c3d68ce5dee76f30b23ca29b2be4774e291f7f1] ASoC: soc-card: remove card check # good: [82a0a3e6f8c02b3236b55e784a083fa4ee07c321] ASoC: renesas: rz-ssi: Add a check for negative sample_space # good: [309caeef4381e8777f65030dccabc71456650269] ASoC: Merge up v6.13-rc6 # good: [d406b354df909155ff0122acf80f3bc7410fa27e] Expand SoundWire MBQ register map support # good: [5bc493bf0c37c157bf2eb364e55a1c6f8bc43a69] regmap: sdw-mbq: Add support for SDCA deferred controls # good: [fdd9ef3dce98e035d21c17fac587cb6e3c7706fd] regmap: sdw-mbq: Add support for further MBQ register sizes # good: [8227c7510b56460e9ecf1acf4e5150da7070ab6c] Minor debugging improvements # good: [b21468e83b787ab31aa9df8f429d2ca61def0cc9] ASoC: SDCA: Update list of entity_0 controls # good: [5d085b25ae9843b4865360986ab288332bb01e21] ASoC: rt5682: Support the ALC5682I-VE codec # good: [c51187903fe4523fd7f521662c1ae1f1f3174036] ASoC: codecs: Add aw88083 amplifier driver # good: [7b16e60b31202254c62a29f5c709ffb42684b6f9] soundwire: SDCA: Add additional SDCA address macros # good: [a83678be5ea152dca98791956f7bf2a0e899e3ad] ASoC: madera: Use str_enabled_disabled() helper function # good: [fffe003fc209a3c1f3d07be7e860fed4e51c4c00] ASoC: dt-bindings: Correct indentation and style in DTS example # good: [be947cc0cbbb0985d60a77aed709460a46eb3d0b] ASoC: codecs: Add aw88083 amplifier driver # good: [f1a92bb81a6cf9ae9a50d175be8b396bfabcb487] ASoC: simple_card: Show if link is unidirectional # good: [8c588fe965d95fd2d18e1a1d55489b9237eeddfe] ASoC: simple_card: Improve debugging messages # good: [af103eb7d7d881cf6ff7414242bce2d8e394cc32] spi: rockchip-sfc: Support sclk_x2 version # good: [dddca3b2fc676113c58b04aaefe84bfb958ac83e] regulator: of: Implement the unwind path of of_regulator_match() # good: [1e293574c6f5d5d87acd7d64415eae055d0672e7] spi: cadence-quadspi: Enable SPI_TX_QUAD # good: [be92ab2de0ee1a13291c3b47b2d7eb24d80c0a2c] spi: atmel-qspi: Memory barriers after memory-mapped I/O # good: [c0641be588c22fdcecdb1e90a64803047d4441f8] ASoC: SOF: Intel: Use str_yes_no() helper in atom_dump() # good: [530e5ada1c8efb8bac7dad668f4176260d13d4da] ASoC: dt-bindings: renesas,rsnd: remove post-init-providers property # good: [2fcde2fbec74c91fb6a724f44cced67a6837b647] drm/i915/dp: Use intel_display instead of drm_i915_private # good: [a38509fd5cdc125ef54562760a05c68ebd4812bc] spi: atmel-quadspi: Use devm_ clock management # good: [173876aa5d4b8d27b99a4288e2501771fd0c9422] drm/i915/ddi: Optimize mtl_port_buf_ctl_program # good: [e7b73981380cefc9ed6261e3b53c37c327cab189] ASoC: dt-bindings: Add schema for "awinic,aw88083" # good: [2890601f54c7f3365cc2a860889d5d5fba55c106] crypto: vmac - remove unused VMAC algorithm # good: [c5fb51b71788926feef0d07f30c8af1d5e4af1a6] Merge remote-tracking branch 'pm/opp/linux-next' into HEAD # good: [19dbdbfb747ad7afed88dc7661697744ce192d3b] drm/msm/a5xx: remove null pointer check on pdev # good: [855e9d0fbb0aa1150d350b7185d840edd85dfb0e] drm/msm: adreno: enable GMU bandwidth for A740 and A750 # good: [0bc9a9e85fcf4ffb69846b961273fde4eb0d03ab] KVM: arm64: Work around x1e's CNTVOFF_EL2 bogosity # good: [de662429f3362dcc0647dd16879214efa4373d9d] crypto: lib/aesgcm - Reduce stack usage in libaesgcm_init # good: [935cd06bfad4b715195befaf527a2d4fd36361d9] ASoC: SDCA: Clean up error messages # good: [c1ed5eb13f39b0058670bc2b1e251a040c306868] ASoC: SDCA: Add missing function type names # good: [69dcf023f1f13ca9c2e9e8f30b9ec52ac0486c0a] ASoC: SDCA: Split function type patching and function naming # good: [c36297b1bd6e52a75a8ed75eb5dbf35c50402398] ASoC: SDCA: Add bounds check for function address # good: [deb015208f7be9a62cb68dd8337d075b1829ee1d] ASoC: SDCA: Add missing header includes # good: [3d3ca0915aa3692a837f7235ca9d12db26f09911] drm/msm/dpu: link DSPP_2/_3 blocks on SM8650 # good: [a5a9d959936499a3106a1bf3b9070875d0d3dec4] crypto: hisilicon/sec2 - fix for aead invalid authsize # good: [7b6092ee7a4ce2d03dc65b87537889e8e1e0ab95] crypto: qce - revert "use __free() for a buffer that's always freed" # good: [99996d575ee69d4327bad98a0148729b73dde23a] KVM: arm64: Add {get,put}_pkvm_hyp_vm() helpers # good: [c4a6ed85455979ef3fbadc2f1bdf18734b0ecea6] KVM: arm64: Promote guest ownership for DBGxVR/DBGxCR reads # good: [5398ddc5c90bd418b90d859e9267aa39399021af] KVM: arm64: Pass walk flags to kvm_pgtable_stage2_mkyoung # good: [f7d03fcbf1f482069e9afac55b17de3bd323b8f6] KVM: arm64: Introduce __pkvm_vcpu_{load,put}() # good: [c77e5181fed54b25d489eb7d2ccb5c1c72a1063c] KVM: arm64: Make kvm_pgtable_stage2_init() a static inline function # good: [d0bd3e6570aee42766e7bd884734ae078667ea1e] KVM: arm64: Introduce __pkvm_host_share_guest() # good: [ee37bc7e0144e312a8e990acdd4f49e4afa71f1c] firmware: cs_dsp: Delete redundant assignments in cs_dsp_test_bin.c # good: [b69386fcbc6066fb4885667743ab4d4967d561b8] spi: rockchip-sfc: Using normal memory for dma # good: [f663898d047a7a0a04d30732b1405ee007fdd243] spi: atmel-quadspi: Factor out switching to Serial Memory Mode to function # good: [cf126261d5d3b8767fd9c838ffe7213144d05147] ASoC: fsl_asrc_m2m: force cast for snd_pcm_format_t type # good: [2ef8310c464cac41a024fc6fd2910e51f10a38e7] regulator: tps65219: Update driver name # good: [64a6b577490c1c71f1a3bbdb3844717815214621] regulator: tps65219: Remove debugging helper function # good: [e7ce0437709552a5f5e577c29f3dfde620153913] regulator: tps65219: Use dev_err_probe() instead of dev_err() # good: [ca321ef98b80eb282a4dcdd5231f666c610b0575] regulator: tps65219: Remove MODULE_ALIAS # good: [0acb90676629f5549e185dd3a144806e2a88fe40] spi: atmel-quadspi: Refactor to allow supporting # good: [d349fd151f1aeb0d8aea4a2f0fe9ba24309609ed] ASoC: soc-core: remove redundant assignment to variable ret # good: [e490ceff433fbc111404ce040bd9e8f41f12af16] spi: spidev: Align ordering of spidev_spi_ids[] and spidev_dt_ids[] # good: [644115e86023fccdaecb1318133ed14418b76f49] firmware: cs_dsp: Fix endianness conversion in cs_dsp_mock_wmfw.c # good: [7b4035ebf2af2c2f1450e8c38bf4f41acd3f01bf] spi: dt-bindings: Document CS active-high # good: [db8b9b12892f0528c3a78715243c22398ab3cb5d] ASoC: cs42l43: don't include '<linux/find.h>' directly # good: [a5bd108d4a57d6c00372041c83e633a26fb450de] firmware: cs_dsp: Avoid using a u32 as a __be32 in cs_dsp_mock_mem_maps.c # good: [8011709906d0d6ff1ba9589de5a906bf6e430782] spi: rockchip-sfc: Support pm ops # good: [c0a0203cf57963792d59b3e4317a1d07b73df42a] spi: atmel-quadspi: Create `atmel_qspi_ops` to support newer SoC families # good: [8bfb66c75cdace542dabe87841152614fd5b8d91] ASoC: qcom: sdm845: add handling of secondary MI2S clock # good: [5af42209a4d23adc9a09e59e586d1b47fef3cc86] spi: atmel-quadspi: Add support for sama7g5 QSPI # good: [a5dfca553c237c8cfd0b02aacad64d6e6e14149b] ASoC: Intel: Add matches for Cirrus Logic CDB35L56 # good: [b0e4e2030b18b4e8a6820fc7c9da00e120c89338] firmware: cs_dsp: avoid large local variables # good: [37c42bde28f580ac5de4de838afd5eea72e40262] ASoC: rt715: Remove unused hda_to_sdw # good: [301c26a018acb94dd537a4418cefa0f654500c6f] ASoC: soc-pcm: don't use soc_pcm_ret() on .prepare callback # good: [bc7bd5c335030858216581e7a591d02ebfdb53e7] ASoC: Intel: mtl-match: Add CDB35L56-EIGHT-C with aggregated speakers # good: [bf4519f4b1e1fa6286af5d331146238ddc580ea6] ASoC: Intel: tgl-match: Add entries for CS35L56 on CDB35L56-EIGHT-C # good: [539a3f0c99cf62c61edc37a8f88e3073119ae852] firmware: cs_dsp: Fix kerneldoc typos in cs_dsp_mock_bin.c # good: [6dcc8e7f2bb7b748d75844631b2bae860648202a] ASoC: Intel: mtl-match: Add CDB35L56-EIGHT-C 8x CS35L56 without CS42L43 # good: [5725bce709db1c001140d79398581e067e28c031] ASoC: simple-card-utils: Unify clock direction by clk_direction # good: [abf594ce914172e3bb640d02fc6e79569fa25b8e] ASoC: soc-core: tidyup ret handling for card->disable_route_checks # good: [047ea6d85ee32c768ceec9a3ad6b7f403971aa63] crypto: seed - stop using cra_alignmask # good: [9b94f41449939537151dfd91e922b2e897054b94] ASoC: SOF: core/Intel: Handle pause supported token # good: [5ce3beed07b8145aff61f2cb41f1868f6221271f] ASoC: fsl: add memory to memory function for ASRC # good: [94c545aa535d7f5dcf54ad8e648f22943bbfcb32] firmware: cirrus: Add KUnit tests for cs_dsp # good: [cd8c058499b65e8605cd3c387bb1f76e2954870e] firmware: cs_dsp: Add KUnit testing of bin error cases # good: [f4425e3ab2f796d442a44f31262eade9b6427ff7] ALSA: compress: Add output rate and output format support # good: [70a667d70cce338ab8552dd762ae114a5ab96500] ASoC: SOF: Add support for pause supported tokens from topology # good: [75a4a6ef615e2f4e9458051641f185498273ce02] firmware: cs_dsp: Add KUnit testing of client callbacks # good: [7c052c6615297ff32032105130cd5f02059f7ae4] firmware: cs_dsp: Add mock bin file generator for KUnit testing # good: [286d658477a43284f7be2539b059ecc90ba109c2] ASoC: fsl_asrc: register m2m platform device # good: [41e78c0f44f97c958afcda3f82b23f4f4a05b968] firmware: cs_dsp: Add mock DSP memory map for KUnit testing # good: [b62eaff0650dc6dc2a4bf0f50714f2357a23fc71] ASoC: fsl_easrc: register m2m platform device # good: [5cf1b7b471803f7cc654a29ee16cb085ad69c097] firmware: cs_dsp: Add mock wmfw file generator for KUnit testing # good: [dd0b6b1f29b92202d03a6d2dd7d65ecead27941a] firmware: cs_dsp: Add KUnit testing of bin file download # good: [a2b2f2c1cd2a8b21c23bd1ec33131d2266c7568a] firmware: cs_dsp: Add KUnit testing of wmfw download # good: [feb5fb0615f321ab514f4fbbab777f3591f7e4b5] firmware: cs_dsp: Add KUnit testing of wmfw error cases # good: [8ea7d04a4e9e30876c9d8184b4b8e4cab33e0372] ASoC: fsl_asrc: define functions for memory to memory usage # good: [9b33a4fc500cedc1adc9c0ee01e30ffd50e5887a] firmware: cs_dsp: Add KUnit testing of control cache # good: [f851b987f39121bb73d110c8508cac5ea60cfdc5] ASoC: SOF: sof-priv: Remove unused SOF_DAI_STREAM() and SOF_FORMATS # good: [e4b3a8456447f0e10223ebaca81efabe8a71f3f2] ASoC: SOF: ipc4-topology: Use macro to set the EXT_PARAM_SIZE in widget setup # good: [d54a3fc6bf3db0db0e16cfdf7f48a8bbb803f6b0] firmware: cs_dsp: Add mock regmap for KUnit testing # good: [24a01710f6271ec32b629d714e6a64a69665128b] ASoC: fsl_asrc_m2m: Add memory to memory function # good: [3a47319d2d910291f4c09c0f1fec4e86a2e03696] ASoC: SOF: Intel: hda-pcm: Follow the pause_supported flag to drop PAUSE support # good: [fe54fd5474f746f07f2b587f2f5e3311bf611970] firmware: cs_dsp: Add KUnit testing of control read/write # good: [27147695aaf7ccb0edc3f21454b5405c9037b4ba] ASoC: fsl_easrc: define functions for memory to memory usage # good: [83baecd92e7c2a44ac963fab8fd4476c71e19ddd] firmware: cs_dsp: Add KUnit testing of control parsing # good: [08242719a8af603db54a2a79234a8fe600680105] regulator: dt-bindings: mt6315: Drop regulator-compatible property # good: [3ce8df13f65e3ed297def63bb1e3ee6f024cbdc5] Add audio support for the Renesas RZ/G3S SoC # good: [dec61e16e72db196e8dc1daf7f7022fd98e6d921] ASoC: renesas: rz-ssi: Remove the rz_ssi_get_dai() function # good: [f2efcd90b58d74e6aab7ba47ead0dedc543c0145] drm/i915/display: clean up DP Adaptive Sync SDP state mismatch logging # good: [eb708cd631a8dca17ff004ccc39bbeb096c1db22] regmap: regmap_multi_reg_read(): make register list const # good: [c28dac5d3a6e87615d4c8e50f574c320172a3d55] ASoC: dt-bindings: renesas,rz-ssi: Remove DMA description # good: [cf3a79e4f826fc680fd7bfef7c427e2cc6023bc3] ASoC: renesas: rz-ssi: Enable runtime PM autosuspend support # good: [f0c155c9da7536ab33687b5207eb21e704122a56] ASoC: renesas: rz-ssi: Use goto label names that specify their actions # good: [1fc778f7c833aeb13041adc06f016f1a2dff7350] ASoC: renesas: rz-ssi: Add suspend to RAM support # good: [fc2a31affb22394d1d74d3ecc86b5c68da33d52a] ASoC: renesas: rz-ssi: Issue software reset in hw_params API # good: [100c6b22d6c70adabdf45dcb346d7d853bff6a30] ASoC: renesas: rz-ssi: Fix typo on SSI_RATES macro comment # good: [ab20bcb2d0c80b4df9f9a6ef86c6e47d5d10cba0] ASoC: dt-bindings: convert rt5682.txt to dt-schema # good: [403366d2a43eb7c911c6cddf1d7882e429d1212d] ASoC: renesas: rz-ssi: Use temporary variable for struct device # good: [e8fcf25f562891d5c0734d4f49c44bb6aa72bc15] ASoC: renesas: rz-ssi: Rely on the ASoC subsystem to runtime resume/suspend the SSI # good: [55c209cd4318c701e6e88e0b2512a0f12dd02a7d] ASoC: renesas: rz-ssi: Use only the proper amount of dividers # good: [541011dc2d7c4c82523706f726f422a5e23cc86f] ASoC: renesas: rz-ssi: Terminate all the DMA transactions # good: [699a9733a354d74482ae4d4304acdbb0c0318a23] ASoC: dt-bindings: renesas,rz-ssi: Document the Renesas RZ/G3S SoC # good: [3888672495fcaee98b90196c0a899b1c2eb57d5b] ASoC: renesas: rz-ssi: Add runtime PM support # good: [4bf77dfa3308b7cfda29d9c4ead1dc32f1ceefa9] ASoC: renesas: rz-ssi: Use readl_poll_timeout_atomic() # good: [109e60866f11c7db8f720f01b0bda3105c47b463] ASoC: renesas: rz-ssi: Remove the first argument of rz_ssi_stream_is_play() # good: [a73710a25808a585a2bf0a8325eb16fd6a2f370c] ASoC: renesas: rz-ssi: Remove pdev member of struct rz_ssi_priv # good: [3f3b063e0c6d6c35da99bdabba0a9f2bc7e58a47] spi: Unify and simplify fwnode related checks # good: [c56078128c0afe92985c378478b0b0435062c8df] ASoC: simple-card-utils: tidyup for Multi connection # good: [8c695b4d19cff2828683b8ec1aa6794419ef3a86] ASoC: Intel: boards: updates for 6.14 # good: [b7cc281812c4e0545d415e9761d5b03e130a41f2] spi: Merge up fixes # good: [527acf5de4c060ebb3d1eb98c4acf21743c2cde7] Add function to constrain rates # good: [5a305d9d48df11e8eeb8c28fa08927067bc274af] ASoC: sun4i-spdif: Add 24bit support # good: [b6ffe0e6147915fe3d31705e14dfbbecb724fb81] spi: Unify firmware node type checks # good: [80ac12ffb3a9e19a2f11eb1975ed31c9a39183c8] ASoC: sun4i-spdif: Always set the valid data to be the MSB # good: [17b531c162e5dbdce9a184ccd1c730ae3f31576b] regulator: dt-bindings: pca9450: Add pca9452 support # good: [a17162f0b2dc97aa2dedfde8a7226fb9b5210534] spi: mxs: support effective_speed_hz # good: [af4cffb250ec9e26a76c90cf753f1a6630811eed] ASoC: tas2781: Remove use of i2c_match_id() # good: [06c61070173803a5341be31ff5281d15cc133e5d] ASoC: tas5720: Remove use of i2c_match_id() # good: [77f3bfeacb939b47e1ffcda000cdf3c52af70e0f] ASoC: wm8904: Remove use of i2c_match_id() # good: [229773f90b1f886e8fd542f98b495c66e43be5ba] regulator: pca9450: add enable_value for all bucks # good: [b9f99efcc59ae86bcf238719e29427e9519b3878] ASoC: pcm186x: Remove use of i2c_match_id() # good: [f742875ee2534473ca4bf5ce1e120bebdf8d624d] ASoC: tlv320aic31xx: Remove use of i2c_match_id() # good: [2a169c459d9614dd6edebd8d34ab096b09f134ac] ASoC: tlv320aic3x: Remove use of i2c_match_id() # good: [0020c9d2d572b49c55b2e1fabe6f6687e11a3ced] spi: Deduplicate deferred probe checks in spi_probe() # good: [55cf63cc8d951246ec35195ae5a1628beb9c9da3] ASoC: tlv320adc3xxx: Remove use of i2c_match_id() # good: [0a7bd3dba60a967032ce8c05b4d81350f01ecc8a] ASoc: pcm6240: Remove use of i2c_match_id() # good: [8332e667099712e05ec87ba2058af394b51ebdc9] spi: zynq-qspi: Add check for clk_enable() # good: [0f5c601098bd3c9cdfea3e01aacdd9d0c4010ea7] regulator: pca9450: Use dev_err_probe() to simplify code # good: [017b76fb8e5b6066f6791e7ad2387deb2c9c9a14] regulator: pca9450: Add PMIC pca9452 support # good: [eb4b5da0ecf61135533574285bacb9dab4fc4703] ASoC: tas2562: Remove use of i2c_match_id() # good: [6c978c1baeb8449114e8cb35c68832e903f713d8] ASoC: ssm2602: Remove use of i2c_match_id() # good: [7d57d1ce9398bb59fa0b251aa2ffa6eafef5cff4] ASoC: wm8985: Remove use of i2c_match_id() # good: [0a2319308de88b9e819c0b43d0fccd857123eb31] ASoC: sun4i-spdif: Add clock multiplier settings # good: [a8bb9855de4c5ca5b586814b7f8cc4a77d9e8b9c] ASoC: max98095: Remove use of i2c_match_id() # good: [cb47dcedef8dee9e9e64598612b2a301f70a7fdb] ASoC: tpa6130a2: Remove use of i2c_match_id() # good: [6e750d3ec7410c8d3aa6a006d37142eb837b3c03] ASoC: sun4i-spdif: Add working 24bit audio support # good: [124d534c581cda93aae06b37351ed76af7b98d5c] ASoC: Intel: soc-acpi-intel-lnl-match: add rt713_vb_l2_rt1320_l13 support # good: [5757b31666277e2b177b406e48878dc48d587a46] ASoC: Merge up v6.12-rc2 # good: [56731c80fc3b17850e49913cec262c2bcaa88dcb] ASoC: adau1761: Remove use of i2c_match_id() # good: [ebf572bfefcd27584e1b32b0dd51ba71f3fe33d6] ASoC: max98088: Remove use of i2c_match_id() # good: [558d516e4b0f886f15ea04c83bf3ab0bbe62e474] ASoC: Intel: sof_sdw: Add a dev_dbg message for the SOC_SDW_CODEC_MIC quirk # good: [90a73807fd8a6c044cc971e53c2cc602f3841ef6] ASoC: Intel: sof_sdw: reduce log level for not using internal dmic # good: [bd4a5c8d5356fa42a1d63b684d34cf58a21eb8f7] ASoC: simple-card-utils: use for_each_of_graph_port() on graph_get_dai_id() # good: [d6ba6f50fae4170a8b7058da81dc2644913a5216] ASoC: adau1977: Remove use of i2c_match_id() # good: [a3003af649efb6f3d86d379d1e9a966ea6d5f5ab] ASoC: Intel: soc-acpi: arl: Correct naming of a cs35l56 address struct # good: [41f91a884f9e5d9fda73fcb30d87b72fb7526216] ASoC: Intel: sof_sdw: improve the log of DAI link numbers # good: [4edc98598be43634f87af5d3876ebec6c274d2cb] ASoC: fsl_sai: Add sample rate constraint # good: [7662f0e5d55728a009229112ec820e963ed0e21c] ASoC: Intel: sof_sdw: Correct quirk for Lenovo Yoga Slim 7 # good: [b622b677d255b41cbfce20b66535723933a6b640] ASoC: fsl_xcvr: Add sample rate constraint # good: [db2aaa0943803fbba606e3b59b5cf900eced2a5c] ASoC: max98090: Remove use of i2c_match_id() # good: [f9812846ffdb1f5686154cae18ca8cc765232967] ASoC: adau1781: Remove use of i2c_match_id() # good: [e9705da8472f306b44cbe1992ea2161bb96ece6e] ASoC: dt-bindings: qcom,wcd9335: Drop number of DAIs from the header # good: [bd40d912728fc306e0861c82af4a359d8691ee16] ASoC: Intel: soc-acpi-intel-ptl-match: add rt712_vb + rt1320 support # good: [e5fca61fdfcdd7d3cc43c0b4c3b959d4f2b06666] spi: Merge up v6.12-rc2 # good: [99816f3fa964380a50ccc898b08cc7d9dd58c764] ASoC: alc5632: Remove use of i2c_match_id() # good: [a7ebb0255188a7a2f1c9edd5660346bd5b17fb7b] ASoC: Intel: soc-acpi-intel-ptl-match: add rt713_vb_l2_rt1320_l13 support # good: [820bcaeb1ff5705ba907563e554f17d0deecc3fa] ASoC: fsl_utils: Add function to constrain rates # good: [1331fb6640440f42a709eafd5c802f3496f746b8] regmap: Merge up v6.12-rc2 # good: [76c29db042e4f0fdea75c76cd4ad5f36080cd1c9] ASoC: codecs: wcd9335: Add define for number of DAIs # good: [b5e8f7abbb73d0f71ec8742c990c7e1ffa44a554] ASoC: alc5623: Remove use of i2c_match_id() # good: [daf7a173fc7c4b652f3fe69d3b5aa520976a7d63] ASoC: fsl_micfil: Switch to common sample rate constraint function # good: [8c491103c946fb760005044a74c82d7cf6c6f6b4] ASoC: ad193x: Remove use of i2c_match_id() # good: [419d1918105e5d9926ab02f1f834bb416dc76f65] ASoC: simple-card-utils: use __free(device_node) for device node # good: [4ab80a2961c75562ffbac1f80de151a978c31659] ASoC: Intel: sof_sdw: correct mach_params->dmic_num # good: [76deee29153b8313cc9629d3db45e56024b3dd26] ASoC: simple-card-utils: check port reg first on graph_get_dai_id() # good: [d7f671b2f566379f275c13e25a29fa7001bb278f] ASoC: Intel: soc-acpi: arl: Add match entries for new cs42l43 laptops # good: [a6ebabd0e53d4352abe0fd2ad156a52162f5d3ce] regulator: Merge up v6.12-rc2 # good: [5a56323a54b7febcfe82cc5eda840a176647b7cd] ASoC: dt-bindings: mediatek,mt8188-mt6359: Allow DL_SRC/UL_SRC dai-links # good: [8e22ea5fb8498c52fcc20bbe2070c3aef1a3dff2] ASoC: dt-bindings: mediatek,mt8188-mt6359: Add compatible for mt8390 evk # good: [1a90aae3b25b72e639da6062e0dc5efb9cff58f1] spi: spi-kspi2: Add KEBA SPI controller support # good: [d59f0196e990e5a1bb474eabf146f25cb8aea33d] ASoC: Correct *-objs usages # good: [577f1cf76ceedb5fbdc9aca4f712b21864ac15ee] spi: rockchip-sfc: Optimize the judgment mechanism completed by the controller # good: [31823f27f84bfa06be20f98ec9be63a671307d63] ASoC: Splitting cs35l56 SoundWire DAI into separate # good: [9d6aacda3ad546048e02d83e5831e0b415382518] Add support for codec of F1C100s # good: [297711ba0282abef38824b1e08c0ad6dcb6c4a53] ASoC: fsl_xcvr: Add suspend and resume support # good: [c41da3a620e611b16b62a5cf93168caf01252fc4] ASoC: Merge up origin to resolve interaction with manline symbol changes # good: [582057d2233a5a38e1aec3f4a6d66b362b42076c] ASoC: wcd937x: Use *-y for Makefile # good: [f686a2b52e9d78cf401f1b7f446bf0c3a81ebcc0] pinctrl: samsung: Fix irq handling if an error occurs in exynos_irq_demux_eint16_31() # good: [ba257e7006867ab1844a6449bdfa3b5aea94fe29] spi: cadence-quadspi: Add support for device reset # good: [c841f9909b0d947ae7593040cc59646dc9f14455] dt-bindings: dma: qcom,gpi: Add QCS615 compatible # good: [569922b82ca660f8b24e705f6cf674e6b1f99cc7] ASoC: SOF: Intel: hda-dai: Ensure DAI widget is valid during params # good: [bcbf421d2190bc4f7d3fd2cc61caf748779ee69e] ASoC: amd: ps: update mach params subsystem_rev variable # good: [5547e7ca122081d0603d2d7e0fe81a7c551f1e11] ASoC: cs35l56: Split SoundWire DAI into separate playback and capture # good: [bb2cc3014d74dfdab0b358b4539a9d2747598663] ASoC: dt-bindings: Add Allwinner suniv F1C100s Audio Codec # good: [3f0b8d367db5b0c0a0096b1c2ff02ec7c5c893b6] ASoC: cs40l50: Use *-y for Makefile # good: [a308f9e47fc2377863f0f561ceedd45ccc7c7f9c] regmap: Cleanup and microoptimization # good: [8359ea9c119570fb5971379655661f77a3aafb1d] ASoC: Drop explicit initialization of struct i2c_device_id::driver_data to 0 # good: [f60646d9c3bd5b390728ed1a1caa9ded53d47afc] ASoC: SDCA: Use *-y for Makefile # good: [484c997e03cec04da6f69c2c17e854b22aa0f98f] ASoC: sdw_utils: cs_amp: Assign non-overlapping TDM masks for each codec on a bus # good: [7378aeb664e5ebc396950b36a1f2dedf5aabec20] remoteproc: core: Fix ida_free call while not allocated # good: [e9d2a2f49244d9737f0ec33f4b7f3580faecd805] ASoC: mediatek: mt8365: Use *-y for Makefile # good: [5f7fb33b7ba1287c33e35b7778d5a371472e3503] drm/i915/display: remove unused for_each_crtc() # good: [25cd677636d316669871947639430615ff564890] ASoC: amd: ps: add ZSC control register programming sequence # good: [7916a8d8782d4e53fe0133c8dace20a925e0204e] ASoC: cs42l84: Use *-y for Makefile # good: [2198deb823a6ebe110b737614421a4687d3327f4] ASoC: sun4i-codec: Add support for Allwinner suniv F1C100s # good: [cabd4ac290a6ceb87c8dbfb5a3251750e24529e7] ASoC: sun4i-codec: Add DMA Max Burst field # good: [1684e8293605062dee45a5e4118fe8db6cd0d9d9] arm/crc-t10dif: expose CRC-T10DIF function through lib # good: [a4a7d86bc1a59839ad0dffbefa473135b342dd0b] regmap: Use BITS_TO_BYTES() # good: [2e4d9f5111a3b3c24550e34710efa690c03b3ea1] spi: cadence-quadspi: Use quirks to set dma_set_mask instead of compatible string for 64-bit DMA support # good: [42c7af046aaf35c42ef864cbd96df025c48ce50f] ASoC: rockchip: i2s-tdm: Fix a useless call issue # good: [9b3cd5c7099fe7710356dd76ecf9910dc8c32548] regmap: place foo / 8 and foo % 8 closer to each other # good: [096c34ddf5835f02f5260719cd8a16fcf5e5e56f] spi: spidev: Add an entry for lwn,bk4-spi # good: [27cf57f65bea55d985f0ad0dc1737ce1d01f05dc] spi: cadence-quadspi: Support for device reset via OSPI controller # good: [37c95f022a7a34823c123eeccdfe415b88562867] regmap: cache: mapple: use kmalloc_array() to replace kmalloc() # good: [f2b4fa19647e18a2e2aade7e3e4620567e7e594a] ext4: switch to using the crc32c library # good: [e6a9750a346b103bd8ab2bf25be76a719d8061b2] ASoC: fsl_xcvr: Add suspend and resume support # good: [dc9f2312acaee205609ad3c8b5f064e39eab1d6b] ASoC: tas2781: Fix redundant logical jump # good: [3787255c967ba64dc72adc3038f0cb81211bd297] ASoC: cs42l51: Constify struct i2c_device_id # good: [e39531352aed30156b270a61ba075e5b8d3b8498] spi: rockchip-sfc: Support ACPI # good: [509544d1b6dbffe7bc1849593ff217f965ec0419] ASoc: mediatek: mt8365: Don't use "proxy" headers # good: [36e7886075262429158aec6f258e6a5a92f025b1] dt-bindings: misc: lwn,bk4-spi: Add binding # good: [4a3aafe01f6c628932a402c21e58101173c8dab3] regmap: cache: Use BITS_TO_BYTES() # good: [c14e85360969d7b0aaeab3915314787f3466c326] lib/crc16_kunit: delete obsolete crc16_kunit.c # good: [a8d77166fcfe1cd4be70c21d65ff2b27b4f54a26] regulator: bd96801: Add ERRB IRQ # good: [707080d4fea8f6b8319ceead569f34c2be5bf1d5] spi: dt-bindings: cdns,qspi-nor: Add compatible string to support OSPI controller on Versal Gen2 platform # good: [2c55f67c3a71cf57665294a02f258625c1da9385] spi: sc18is602: Switch to generic firmware properties and drop of_match_ptr() # good: [5a8b4785cddabfad348a96ca38eb0c3d735202df] ASoC: fsl_xcvr: Use regmap for PHY and PLL registers # good: [b95cacd8d708bce5839db2767d425e20ae548fd8] regmap: cache: rbtree: use krealloc_array() to replace krealloc() # good: [01981565c764c554cc96e2d30a71c42975171416] ASoC: mediatek: mt8192-afe-pcm: Simplify probe() with local dev variable # good: [e03b0aa67ac0106d8961581a426649fabab50827] drm/xe: Set XE_BO_FLAG_PINNED in migrate selftest BOs # good: [f161809b362f027b6d72bd998e47f8f0bad60a2e] drm/xe/guc_submit: fix race around suspend_pending # good: [b6308aaa24a7ad3dfc6157b6afc550b9ab7e8945] drm/xe/display: Update intel_bo_read_from_page to use ttm_bo_access # good: [7d08df5d0bd3d12d14dcec773fcddbe3eed3a8e8] drm/ttm: Add ttm_bo_access # good: [54254727837440966c3381ea688df002ff14f269] drm/xe: Only allow contiguous BOs to use xe_bo_vmap # good: [90e315a58fd903e43457fa085b6644e45c047e31] drm/xe/gsc: Improve SW proxy error checking and logging # good: [678ccbf987969a6020fe95ecb4a2f568e7466821] drm/xe/vram: drop 2G block restriction # good: [6baab135eb00e85020abd0f13907a934b3df5c6b] MAINTAINERS: exec: Add auxvec.h UAPI # good: [2378bd0b264ad3a1f76bd957caf33ee0c7945351] ipmi: ipmb: Add check devm_kasprintf() returned value # good: [9fbf78b6d6cecc2e9833c2f74eb2edc027c9b4cb] Merge branch 'for-6.12/trivial' into for-next # good: [136a78710f33e91e28ff4bd29e256ca27f87631f] MAINTAINERS: exec: Mark Kees as maintainer # good: [9871e6af43db3892811f5a4ed0ed2e2d7cf6cf3c] Merge branch 'for-6.11/sysfs-patch-replace' into for-next git bisect start 'e7bb221a638962d487231ac45a6699fb9bb8f9fa' '7b90deb712bbacdf8aa1fc01bf155cab5c21d98a' '6b077230a1e163f01c866923915def6f73f9c390' 'e896c04890aeff2292364c19632fc15d890d436c' '41f1d2bd4998829341cdada022ede610068a0f33' '40ba3c9019ccd34d576fa14f94ef4f3bd9284c1a' 'eab69050450ba63a4edb17d3d1a8654d2a130786' '3927c51e49c1a45785334dc578f0b29c685619ec' '9a8afbe5677234ac2490438d6b8ab74ee7fb359e' '65880d32e1d7eb1ef03253c454fcd8f9d41aaa09' '292284f2be46514ed07e7b3e3350329f656c4f62' '9d499259db0cc5a31e212570c2cf945ad117b900' '8eb27b5758e6fb6d1881413e3f1159c579ac48b3' '7299cc06fe4ab2ac26af73ac5fecd35a28fef527' '5f281c3e82b1203c40cf6ead009ffb5b09db056b' 'c8903242bcb119660232c9cbf336fea3737d1a60' '85dc053c87bcc32afd8e5cbf20a649dc24e93d24' '365865b7d7467aea9767ea18670198921bcada7c' 'c8a1dccf449eb71b23b6c04ff6b40db568d7cf92' '24410f499e808884cc91239dc16013e5bee8779a' '2518a0e1b878042f9afa45ae063e544a16efc1a3' '6f490e6b2c34792e363685bacb48a759e7e40cd1' 'a1a771e5f1e31e4764d9a225c02e93969d3f5389' 'e8d06511ee70175a58be450a098ab1ce37fe9ecb' '4e26de25d2b617e12bba98e11393fdf7c27885f9' '6f91d31d47c57953da68e1a91240ae2543b00172' '38138762faffeb923d9f49efbcc09884f1530786' 'd0670128d42fa170bf8ba878cd23504c5c5cccc7' 'e880b16efb78f9c7449239a76814aeb015daf2a1' '8fd113c6ba2490e4ce38447a596ab448eeb1a1f4' '17b99c04d9b48465d45b0913fa78a6859b0b24c5' 'a2b579c41fe9c295804abd167751f9fdc73c7006' 'c382ee674c8b5005798606267d660cf995218b18' '226d6cb3cb799aae46d0dd19a521133997d9db11' 'fd85b6b7bc53409d0be82763419bdcdaa48f2c91' '89b37e49929653b7c350aac7fb2b96a052533015' 'abea0cbfba5848d11b6364e82df4864fd0bfa683' '2438db5253eb17a7c0ccb15aea4252a150dda057' '26851cf65ffca2d3a8d529a125e54cf0084d69e7' 'd3f35dd3ad968256ed1080e3ea2022f947861cff' '67707cb094f134f5b3931eefbedbb9ca7e3209d0' 'd1f85873d2d62d6980e68d21d3a21f20b0664cc3' '13529647743d906ed3cf991f1d77727e7ff1fb6f' '5baa189789e8894c58eacc7803e3c163c1d0fc0a' 'b2fac3192919dd07e7ce30558e34abd7e07dde77' '1248c9b8d54120950fda10fbeb98fb8932b4d45c' 'eee7bc9e7ade6f7ac17d9ec02887cd5509ba9427' '13fd04b53053bbfa741a0f2a781837ab80e485f6' '1a206344218cc15ad8f321e3abab3f3d36ab639f' 'e6204f39fe3a7b4538815a2d778b601bd543649e' '0fefeade90e74bc8f40ab0e460f483565c492e28' 'd0e5faccb229b1dacc4c9fa11f6df33bb1fdabd8' '30eb2e6e78225f92f04a2325c6fd77fe8f5b4aab' '84eac6d478c00f8f9101f91716ea3866d2fc1e54' '9a68f6c8d6cfddeac7c5874528ed04e50a1cb579' '06e9f5a1f6ba774d8942a168d3ec5ed5a008fbcb' 'f0006897a96c736623ddeb9b68c3880eb5cdebe7' '61aff2da3e63a43f22e60aa1bc57026ce07d189e' 'dd2395162c07e4102fc83878dc394ff63f2eaae8' 'fd688ce125a4ff5cc2b6be1184dc17c9f342db37' '7e24ec93aecd12e33d31e38e5af4625553bbc727' '9c0e29b9957e407af6197ff1fb48f365a9b0c248' 'c3ad22ad34f81a8906dba02ea8cc9756d2ce7b50' 'cf4d74256fe103ece7b2647550e6c063048e5682' 'e9ca3db9f01a7ce91ceab35cd5fa52f0c5aca174' '33228036ff655ebed1bc4bde9c9b6329b569b27b' 'e3146775f05d18c667a2e26082da3ac105f87d9f' 'bca0fa5f6b5e96c03daac1ed62b1e5c5057a2048' '5e56618e1593a9eb9d72dc9433ac7a02a6c48c8f' '5640fd07b90ed43225704fecfbbda9d402dba1cf' '636ee5781d259258dc9425a5552be1ffa458633c' 'dbda5c35b88794f6e5efe1b5b20044b0b3a340d4' 'aea305d28551bc213aab3a41a0f59412247ae2b4' '3eede0fc99c684df6f3f35866761036dabf89d05' '94aa347d34e079859a5378272c9452c728e4183a' '480d9bb9cfb7b774b22cf82ff21903eb50d64cb9' '0ca529926c5d9d0a3c0b1609fb7034ab870e4770' '0b12850ddfb0032376ef1be10b5b46be00bba4d4' 'ef724707788325a53ffa4cf58fceb94654e4793a' '3566784817aeb1a733c95953998a29adc386d2ff' '9c3d68ce5dee76f30b23ca29b2be4774e291f7f1' '82a0a3e6f8c02b3236b55e784a083fa4ee07c321' '309caeef4381e8777f65030dccabc71456650269' 'd406b354df909155ff0122acf80f3bc7410fa27e' '5bc493bf0c37c157bf2eb364e55a1c6f8bc43a69' 'fdd9ef3dce98e035d21c17fac587cb6e3c7706fd' '8227c7510b56460e9ecf1acf4e5150da7070ab6c' 'b21468e83b787ab31aa9df8f429d2ca61def0cc9' '5d085b25ae9843b4865360986ab288332bb01e21' 'c51187903fe4523fd7f521662c1ae1f1f3174036' '7b16e60b31202254c62a29f5c709ffb42684b6f9' 'a83678be5ea152dca98791956f7bf2a0e899e3ad' 'fffe003fc209a3c1f3d07be7e860fed4e51c4c00' 'be947cc0cbbb0985d60a77aed709460a46eb3d0b' 'f1a92bb81a6cf9ae9a50d175be8b396bfabcb487' '8c588fe965d95fd2d18e1a1d55489b9237eeddfe' 'af103eb7d7d881cf6ff7414242bce2d8e394cc32' 'dddca3b2fc676113c58b04aaefe84bfb958ac83e' '1e293574c6f5d5d87acd7d64415eae055d0672e7' 'be92ab2de0ee1a13291c3b47b2d7eb24d80c0a2c' 'c0641be588c22fdcecdb1e90a64803047d4441f8' '530e5ada1c8efb8bac7dad668f4176260d13d4da' '2fcde2fbec74c91fb6a724f44cced67a6837b647' 'a38509fd5cdc125ef54562760a05c68ebd4812bc' '173876aa5d4b8d27b99a4288e2501771fd0c9422' 'e7b73981380cefc9ed6261e3b53c37c327cab189' '2890601f54c7f3365cc2a860889d5d5fba55c106' 'c5fb51b71788926feef0d07f30c8af1d5e4af1a6' '19dbdbfb747ad7afed88dc7661697744ce192d3b' '855e9d0fbb0aa1150d350b7185d840edd85dfb0e' '0bc9a9e85fcf4ffb69846b961273fde4eb0d03ab' 'de662429f3362dcc0647dd16879214efa4373d9d' '935cd06bfad4b715195befaf527a2d4fd36361d9' 'c1ed5eb13f39b0058670bc2b1e251a040c306868' '69dcf023f1f13ca9c2e9e8f30b9ec52ac0486c0a' 'c36297b1bd6e52a75a8ed75eb5dbf35c50402398' 'deb015208f7be9a62cb68dd8337d075b1829ee1d' '3d3ca0915aa3692a837f7235ca9d12db26f09911' 'a5a9d959936499a3106a1bf3b9070875d0d3dec4' '7b6092ee7a4ce2d03dc65b87537889e8e1e0ab95' '99996d575ee69d4327bad98a0148729b73dde23a' 'c4a6ed85455979ef3fbadc2f1bdf18734b0ecea6' '5398ddc5c90bd418b90d859e9267aa39399021af' 'f7d03fcbf1f482069e9afac55b17de3bd323b8f6' 'c77e5181fed54b25d489eb7d2ccb5c1c72a1063c' 'd0bd3e6570aee42766e7bd884734ae078667ea1e' 'ee37bc7e0144e312a8e990acdd4f49e4afa71f1c' 'b69386fcbc6066fb4885667743ab4d4967d561b8' 'f663898d047a7a0a04d30732b1405ee007fdd243' 'cf126261d5d3b8767fd9c838ffe7213144d05147' '2ef8310c464cac41a024fc6fd2910e51f10a38e7' '64a6b577490c1c71f1a3bbdb3844717815214621' 'e7ce0437709552a5f5e577c29f3dfde620153913' 'ca321ef98b80eb282a4dcdd5231f666c610b0575' '0acb90676629f5549e185dd3a144806e2a88fe40' 'd349fd151f1aeb0d8aea4a2f0fe9ba24309609ed' 'e490ceff433fbc111404ce040bd9e8f41f12af16' '644115e86023fccdaecb1318133ed14418b76f49' '7b4035ebf2af2c2f1450e8c38bf4f41acd3f01bf' 'db8b9b12892f0528c3a78715243c22398ab3cb5d' 'a5bd108d4a57d6c00372041c83e633a26fb450de' '8011709906d0d6ff1ba9589de5a906bf6e430782' 'c0a0203cf57963792d59b3e4317a1d07b73df42a' '8bfb66c75cdace542dabe87841152614fd5b8d91' '5af42209a4d23adc9a09e59e586d1b47fef3cc86' 'a5dfca553c237c8cfd0b02aacad64d6e6e14149b' 'b0e4e2030b18b4e8a6820fc7c9da00e120c89338' '37c42bde28f580ac5de4de838afd5eea72e40262' '301c26a018acb94dd537a4418cefa0f654500c6f' 'bc7bd5c335030858216581e7a591d02ebfdb53e7' 'bf4519f4b1e1fa6286af5d331146238ddc580ea6' '539a3f0c99cf62c61edc37a8f88e3073119ae852' '6dcc8e7f2bb7b748d75844631b2bae860648202a' '5725bce709db1c001140d79398581e067e28c031' 'abf594ce914172e3bb640d02fc6e79569fa25b8e' '047ea6d85ee32c768ceec9a3ad6b7f403971aa63' '9b94f41449939537151dfd91e922b2e897054b94' '5ce3beed07b8145aff61f2cb41f1868f6221271f' '94c545aa535d7f5dcf54ad8e648f22943bbfcb32' 'cd8c058499b65e8605cd3c387bb1f76e2954870e' 'f4425e3ab2f796d442a44f31262eade9b6427ff7' '70a667d70cce338ab8552dd762ae114a5ab96500' '75a4a6ef615e2f4e9458051641f185498273ce02' '7c052c6615297ff32032105130cd5f02059f7ae4' '286d658477a43284f7be2539b059ecc90ba109c2' '41e78c0f44f97c958afcda3f82b23f4f4a05b968' 'b62eaff0650dc6dc2a4bf0f50714f2357a23fc71' '5cf1b7b471803f7cc654a29ee16cb085ad69c097' 'dd0b6b1f29b92202d03a6d2dd7d65ecead27941a' 'a2b2f2c1cd2a8b21c23bd1ec33131d2266c7568a' 'feb5fb0615f321ab514f4fbbab777f3591f7e4b5' '8ea7d04a4e9e30876c9d8184b4b8e4cab33e0372' '9b33a4fc500cedc1adc9c0ee01e30ffd50e5887a' 'f851b987f39121bb73d110c8508cac5ea60cfdc5' 'e4b3a8456447f0e10223ebaca81efabe8a71f3f2' 'd54a3fc6bf3db0db0e16cfdf7f48a8bbb803f6b0' '24a01710f6271ec32b629d714e6a64a69665128b' '3a47319d2d910291f4c09c0f1fec4e86a2e03696' 'fe54fd5474f746f07f2b587f2f5e3311bf611970' '27147695aaf7ccb0edc3f21454b5405c9037b4ba' '83baecd92e7c2a44ac963fab8fd4476c71e19ddd' '08242719a8af603db54a2a79234a8fe600680105' '3ce8df13f65e3ed297def63bb1e3ee6f024cbdc5' 'dec61e16e72db196e8dc1daf7f7022fd98e6d921' 'f2efcd90b58d74e6aab7ba47ead0dedc543c0145' 'eb708cd631a8dca17ff004ccc39bbeb096c1db22' 'c28dac5d3a6e87615d4c8e50f574c320172a3d55' 'cf3a79e4f826fc680fd7bfef7c427e2cc6023bc3' 'f0c155c9da7536ab33687b5207eb21e704122a56' '1fc778f7c833aeb13041adc06f016f1a2dff7350' 'fc2a31affb22394d1d74d3ecc86b5c68da33d52a' '100c6b22d6c70adabdf45dcb346d7d853bff6a30' 'ab20bcb2d0c80b4df9f9a6ef86c6e47d5d10cba0' '403366d2a43eb7c911c6cddf1d7882e429d1212d' 'e8fcf25f562891d5c0734d4f49c44bb6aa72bc15' '55c209cd4318c701e6e88e0b2512a0f12dd02a7d' '541011dc2d7c4c82523706f726f422a5e23cc86f' '699a9733a354d74482ae4d4304acdbb0c0318a23' '3888672495fcaee98b90196c0a899b1c2eb57d5b' '4bf77dfa3308b7cfda29d9c4ead1dc32f1ceefa9' '109e60866f11c7db8f720f01b0bda3105c47b463' 'a73710a25808a585a2bf0a8325eb16fd6a2f370c' '3f3b063e0c6d6c35da99bdabba0a9f2bc7e58a47' 'c56078128c0afe92985c378478b0b0435062c8df' '8c695b4d19cff2828683b8ec1aa6794419ef3a86' 'b7cc281812c4e0545d415e9761d5b03e130a41f2' '527acf5de4c060ebb3d1eb98c4acf21743c2cde7' '5a305d9d48df11e8eeb8c28fa08927067bc274af' 'b6ffe0e6147915fe3d31705e14dfbbecb724fb81' '80ac12ffb3a9e19a2f11eb1975ed31c9a39183c8' '17b531c162e5dbdce9a184ccd1c730ae3f31576b' 'a17162f0b2dc97aa2dedfde8a7226fb9b5210534' 'af4cffb250ec9e26a76c90cf753f1a6630811eed' '06c61070173803a5341be31ff5281d15cc133e5d' '77f3bfeacb939b47e1ffcda000cdf3c52af70e0f' '229773f90b1f886e8fd542f98b495c66e43be5ba' 'b9f99efcc59ae86bcf238719e29427e9519b3878' 'f742875ee2534473ca4bf5ce1e120bebdf8d624d' '2a169c459d9614dd6edebd8d34ab096b09f134ac' '0020c9d2d572b49c55b2e1fabe6f6687e11a3ced' '55cf63cc8d951246ec35195ae5a1628beb9c9da3' '0a7bd3dba60a967032ce8c05b4d81350f01ecc8a' '8332e667099712e05ec87ba2058af394b51ebdc9' '0f5c601098bd3c9cdfea3e01aacdd9d0c4010ea7' '017b76fb8e5b6066f6791e7ad2387deb2c9c9a14' 'eb4b5da0ecf61135533574285bacb9dab4fc4703' '6c978c1baeb8449114e8cb35c68832e903f713d8' '7d57d1ce9398bb59fa0b251aa2ffa6eafef5cff4' '0a2319308de88b9e819c0b43d0fccd857123eb31' 'a8bb9855de4c5ca5b586814b7f8cc4a77d9e8b9c' 'cb47dcedef8dee9e9e64598612b2a301f70a7fdb' '6e750d3ec7410c8d3aa6a006d37142eb837b3c03' '124d534c581cda93aae06b37351ed76af7b98d5c' '5757b31666277e2b177b406e48878dc48d587a46' '56731c80fc3b17850e49913cec262c2bcaa88dcb' 'ebf572bfefcd27584e1b32b0dd51ba71f3fe33d6' '558d516e4b0f886f15ea04c83bf3ab0bbe62e474' '90a73807fd8a6c044cc971e53c2cc602f3841ef6' 'bd4a5c8d5356fa42a1d63b684d34cf58a21eb8f7' 'd6ba6f50fae4170a8b7058da81dc2644913a5216' 'a3003af649efb6f3d86d379d1e9a966ea6d5f5ab' '41f91a884f9e5d9fda73fcb30d87b72fb7526216' '4edc98598be43634f87af5d3876ebec6c274d2cb' '7662f0e5d55728a009229112ec820e963ed0e21c' 'b622b677d255b41cbfce20b66535723933a6b640' 'db2aaa0943803fbba606e3b59b5cf900eced2a5c' 'f9812846ffdb1f5686154cae18ca8cc765232967' 'e9705da8472f306b44cbe1992ea2161bb96ece6e' 'bd40d912728fc306e0861c82af4a359d8691ee16' 'e5fca61fdfcdd7d3cc43c0b4c3b959d4f2b06666' '99816f3fa964380a50ccc898b08cc7d9dd58c764' 'a7ebb0255188a7a2f1c9edd5660346bd5b17fb7b' '820bcaeb1ff5705ba907563e554f17d0deecc3fa' '1331fb6640440f42a709eafd5c802f3496f746b8' '76c29db042e4f0fdea75c76cd4ad5f36080cd1c9' 'b5e8f7abbb73d0f71ec8742c990c7e1ffa44a554' 'daf7a173fc7c4b652f3fe69d3b5aa520976a7d63' '8c491103c946fb760005044a74c82d7cf6c6f6b4' '419d1918105e5d9926ab02f1f834bb416dc76f65' '4ab80a2961c75562ffbac1f80de151a978c31659' '76deee29153b8313cc9629d3db45e56024b3dd26' 'd7f671b2f566379f275c13e25a29fa7001bb278f' 'a6ebabd0e53d4352abe0fd2ad156a52162f5d3ce' '5a56323a54b7febcfe82cc5eda840a176647b7cd' '8e22ea5fb8498c52fcc20bbe2070c3aef1a3dff2' '1a90aae3b25b72e639da6062e0dc5efb9cff58f1' 'd59f0196e990e5a1bb474eabf146f25cb8aea33d' '577f1cf76ceedb5fbdc9aca4f712b21864ac15ee' '31823f27f84bfa06be20f98ec9be63a671307d63' '9d6aacda3ad546048e02d83e5831e0b415382518' '297711ba0282abef38824b1e08c0ad6dcb6c4a53' 'c41da3a620e611b16b62a5cf93168caf01252fc4' '582057d2233a5a38e1aec3f4a6d66b362b42076c' 'f686a2b52e9d78cf401f1b7f446bf0c3a81ebcc0' 'ba257e7006867ab1844a6449bdfa3b5aea94fe29' 'c841f9909b0d947ae7593040cc59646dc9f14455' '569922b82ca660f8b24e705f6cf674e6b1f99cc7' 'bcbf421d2190bc4f7d3fd2cc61caf748779ee69e' '5547e7ca122081d0603d2d7e0fe81a7c551f1e11' 'bb2cc3014d74dfdab0b358b4539a9d2747598663' '3f0b8d367db5b0c0a0096b1c2ff02ec7c5c893b6' 'a308f9e47fc2377863f0f561ceedd45ccc7c7f9c' '8359ea9c119570fb5971379655661f77a3aafb1d' 'f60646d9c3bd5b390728ed1a1caa9ded53d47afc' '484c997e03cec04da6f69c2c17e854b22aa0f98f' '7378aeb664e5ebc396950b36a1f2dedf5aabec20' 'e9d2a2f49244d9737f0ec33f4b7f3580faecd805' '5f7fb33b7ba1287c33e35b7778d5a371472e3503' '25cd677636d316669871947639430615ff564890' '7916a8d8782d4e53fe0133c8dace20a925e0204e' '2198deb823a6ebe110b737614421a4687d3327f4' 'cabd4ac290a6ceb87c8dbfb5a3251750e24529e7' '1684e8293605062dee45a5e4118fe8db6cd0d9d9' 'a4a7d86bc1a59839ad0dffbefa473135b342dd0b' '2e4d9f5111a3b3c24550e34710efa690c03b3ea1' '42c7af046aaf35c42ef864cbd96df025c48ce50f' '9b3cd5c7099fe7710356dd76ecf9910dc8c32548' '096c34ddf5835f02f5260719cd8a16fcf5e5e56f' '27cf57f65bea55d985f0ad0dc1737ce1d01f05dc' '37c95f022a7a34823c123eeccdfe415b88562867' 'f2b4fa19647e18a2e2aade7e3e4620567e7e594a' 'e6a9750a346b103bd8ab2bf25be76a719d8061b2' 'dc9f2312acaee205609ad3c8b5f064e39eab1d6b' '3787255c967ba64dc72adc3038f0cb81211bd297' 'e39531352aed30156b270a61ba075e5b8d3b8498' '509544d1b6dbffe7bc1849593ff217f965ec0419' '36e7886075262429158aec6f258e6a5a92f025b1' '4a3aafe01f6c628932a402c21e58101173c8dab3' 'c14e85360969d7b0aaeab3915314787f3466c326' 'a8d77166fcfe1cd4be70c21d65ff2b27b4f54a26' '707080d4fea8f6b8319ceead569f34c2be5bf1d5' '2c55f67c3a71cf57665294a02f258625c1da9385' '5a8b4785cddabfad348a96ca38eb0c3d735202df' 'b95cacd8d708bce5839db2767d425e20ae548fd8' '01981565c764c554cc96e2d30a71c42975171416' 'e03b0aa67ac0106d8961581a426649fabab50827' 'f161809b362f027b6d72bd998e47f8f0bad60a2e' 'b6308aaa24a7ad3dfc6157b6afc550b9ab7e8945' '7d08df5d0bd3d12d14dcec773fcddbe3eed3a8e8' '54254727837440966c3381ea688df002ff14f269' '90e315a58fd903e43457fa085b6644e45c047e31' '678ccbf987969a6020fe95ecb4a2f568e7466821' '6baab135eb00e85020abd0f13907a934b3df5c6b' '2378bd0b264ad3a1f76bd957caf33ee0c7945351' '9fbf78b6d6cecc2e9833c2f74eb2edc027c9b4cb' '136a78710f33e91e28ff4bd29e256ca27f87631f' '9871e6af43db3892811f5a4ed0ed2e2d7cf6cf3c' # bad: [e7bb221a638962d487231ac45a6699fb9bb8f9fa] Add linux-next specific files for 20250115 git bisect bad e7bb221a638962d487231ac45a6699fb9bb8f9fa # bad: [7e6fed2078eadc4446fb3d6b31ee41e725009858] Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git git bisect bad 7e6fed2078eadc4446fb3d6b31ee41e725009858 # bad: [4b4d01ac54328462849bb9e3a27ec3b8f450b772] Merge branch 'for-next' of git://github.com/Xilinx/linux-xlnx.git git bisect bad 4b4d01ac54328462849bb9e3a27ec3b8f450b772 # bad: [198b52ae0bb80033a800d0f8495311c109000884] Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git git bisect bad 198b52ae0bb80033a800d0f8495311c109000884 # bad: [eec6da7e7e41200a5bc0cef53762faa3cfcb02a5] foo git bisect bad eec6da7e7e41200a5bc0cef53762faa3cfcb02a5 # good: [a865446b3c9efc9118fd2abd80ad7a7f5d1623ad] foo git bisect good a865446b3c9efc9118fd2abd80ad7a7f5d1623ad # good: [2d1b22c49e939917c89f01aedeb7a4b804eb756c] minmax.h: add whitespace around operators and after commas git bisect good 2d1b22c49e939917c89f01aedeb7a4b804eb756c # good: [cb953d97163d0d2cb3187df8c37e4f014fa8100d] selftests/mm: remove argc and argv unused parameters git bisect good cb953d97163d0d2cb3187df8c37e4f014fa8100d # bad: [4c1b87a614cbb73e19747ce46b977ff6b54baacf] selftests/mm/cow: modify the incorrect checking parameters git bisect bad 4c1b87a614cbb73e19747ce46b977ff6b54baacf # bad: [c9c419c146abdc3d6ba43bf3061c26de61548a70] selftests/mm: Makefile: add the compiler flags git bisect bad c9c419c146abdc3d6ba43bf3061c26de61548a70 # bad: [d1737c0c4885d418280710ef62afed4c76904c6d] selftests/mm: hugetlb-madvise: fix type mismatch issues git bisect bad d1737c0c4885d418280710ef62afed4c76904c6d # bad: [a07b5ab38aadc6eb8807f28e9065217bb4b0aaa8] selftests/mm: kselftest_harness: Fix warnings git bisect bad a07b5ab38aadc6eb8807f28e9065217bb4b0aaa8 # good: [3b43278b91b4bafb48df42496f5456b0eed03275] selftests/mm: fix type mismatch warnings git bisect good 3b43278b91b4bafb48df42496f5456b0eed03275 # first bad commit: [a07b5ab38aadc6eb8807f28e9065217bb4b0aaa8] selftests/mm: kselftest_harness: Fix warnings
Fix following warnings: - Remove unused variables - Use __attribute__(unused) with unused variables which aren't being used and cannot be removed because of function pointer declaration - Fix type mismatches
Signed-off-by: Muhammad Usama Anjum usama.anjum@collabora.com --- tools/testing/selftests/mm/cow.c | 46 +++++++++++++++++++------------- 1 file changed, 27 insertions(+), 19 deletions(-)
diff --git a/tools/testing/selftests/mm/cow.c b/tools/testing/selftests/mm/cow.c index ea00c85c76caa..e37eb863e66cd 100644 --- a/tools/testing/selftests/mm/cow.c +++ b/tools/testing/selftests/mm/cow.c @@ -84,7 +84,7 @@ static void detect_huge_zeropage(void) return;
ret = pread(fd, buf, sizeof(buf), 0); - if (ret > 0 && ret < sizeof(buf)) { + if (ret > 0 && (unsigned int)ret < sizeof(buf)) { buf[ret] = 0;
enabled = strtoul(buf, NULL, 10); @@ -263,12 +263,14 @@ static void do_test_cow_in_parent(char *mem, size_t size, bool do_mprotect, close_comm_pipes(&comm_pipes); }
-static void test_cow_in_parent(char *mem, size_t size, bool is_hugetlb) +static void test_cow_in_parent(char *mem, size_t size, + bool __attribute__((unused)) is_hugetlb) { do_test_cow_in_parent(mem, size, false, child_memcmp_fn, false); }
-static void test_cow_in_parent_mprotect(char *mem, size_t size, bool is_hugetlb) +static void test_cow_in_parent_mprotect(char *mem, size_t size, + bool __attribute__((unused)) is_hugetlb) { do_test_cow_in_parent(mem, size, true, child_memcmp_fn, false); } @@ -408,10 +410,11 @@ static void do_test_iouring(char *mem, size_t size, bool use_fork) struct io_uring_cqe *cqe; struct io_uring_sqe *sqe; struct io_uring ring; - ssize_t cur, total; struct iovec iov; char *buf, *tmp; + size_t total; int ret, fd; + ssize_t cur; FILE *file;
ret = setup_comm_pipes(&comm_pipes); @@ -515,7 +518,7 @@ static void do_test_iouring(char *mem, size_t size, bool use_fork) goto quit_child; }
- if (cqe->res != size) { + if ((unsigned int) cqe->res != size) { ksft_test_result_fail("write_fixed failed\n"); goto quit_child; } @@ -529,7 +532,7 @@ static void do_test_iouring(char *mem, size_t size, bool use_fork) ksft_test_result_fail("pread() failed\n"); goto quit_child; } - total += cur; + total += (size_t)cur; }
/* Finally, check if we read what we expected. */ @@ -553,12 +556,14 @@ static void do_test_iouring(char *mem, size_t size, bool use_fork) close_comm_pipes(&comm_pipes); }
-static void test_iouring_ro(char *mem, size_t size, bool is_hugetlb) +static void test_iouring_ro(char *mem, size_t size, + bool __attribute__((unused)) is_hugetlb) { do_test_iouring(mem, size, false); }
-static void test_iouring_fork(char *mem, size_t size, bool is_hugetlb) +static void test_iouring_fork(char *mem, size_t size, + bool __attribute__((unused)) is_hugetlb) { do_test_iouring(mem, size, true); } @@ -702,36 +707,38 @@ static void do_test_ro_pin(char *mem, size_t size, enum ro_pin_test test, free(tmp); }
-static void test_ro_pin_on_shared(char *mem, size_t size, bool is_hugetlb) +static void test_ro_pin_on_shared(char *mem, size_t size, + bool __attribute__((unused)) is_hugetlb) { do_test_ro_pin(mem, size, RO_PIN_TEST_SHARED, false); }
-static void test_ro_fast_pin_on_shared(char *mem, size_t size, bool is_hugetlb) +static void test_ro_fast_pin_on_shared(char *mem, size_t size, + bool __attribute__((unused)) is_hugetlb) { do_test_ro_pin(mem, size, RO_PIN_TEST_SHARED, true); }
static void test_ro_pin_on_ro_previously_shared(char *mem, size_t size, - bool is_hugetlb) + bool __attribute__((unused)) is_hugetlb) { do_test_ro_pin(mem, size, RO_PIN_TEST_PREVIOUSLY_SHARED, false); }
static void test_ro_fast_pin_on_ro_previously_shared(char *mem, size_t size, - bool is_hugetlb) + bool __attribute__((unused)) is_hugetlb) { do_test_ro_pin(mem, size, RO_PIN_TEST_PREVIOUSLY_SHARED, true); }
static void test_ro_pin_on_ro_exclusive(char *mem, size_t size, - bool is_hugetlb) + bool __attribute__((unused)) is_hugetlb) { do_test_ro_pin(mem, size, RO_PIN_TEST_RO_EXCLUSIVE, false); }
static void test_ro_fast_pin_on_ro_exclusive(char *mem, size_t size, - bool is_hugetlb) + bool __attribute__((unused)) is_hugetlb) { do_test_ro_pin(mem, size, RO_PIN_TEST_RO_EXCLUSIVE, true); } @@ -1192,7 +1199,7 @@ static void run_anon_test_case(struct test_case const *test_case)
static void run_anon_test_cases(void) { - int i; + unsigned int i;
ksft_print_msg("[INFO] Anonymous memory tests in private mappings\n");
@@ -1420,7 +1427,7 @@ static const struct test_case anon_thp_test_cases[] = {
static void run_anon_thp_test_cases(void) { - int i; + unsigned int i;
if (!pmdsize) return; @@ -1457,13 +1464,14 @@ static void test_cow(char *mem, const char *smem, size_t size) "Other mapping not modified\n"); free(old); } +//typedef void (*non_anon_test_fn)(char *mem, const char *smem, size_t size);
-static void test_ro_pin(char *mem, const char *smem, size_t size) +static void test_ro_pin(char *mem, const char __attribute__((unused)) *smem, size_t size) { do_test_ro_pin(mem, size, RO_PIN_TEST, false); }
-static void test_ro_fast_pin(char *mem, const char *smem, size_t size) +static void test_ro_fast_pin(char *mem, const char __attribute__((unused)) *smem, size_t size) { do_test_ro_pin(mem, size, RO_PIN_TEST, true); } @@ -1752,7 +1760,7 @@ static void run_non_anon_test_case(struct non_anon_test_case const *test_case)
static void run_non_anon_test_cases(void) { - int i; + unsigned int i;
ksft_print_msg("[RUN] Non-anonymous memory tests in private mappings\n");
As default_hsize is unsigned, it is always greater than equal to zero. Remove expression which is checking if it is less than 0.
Signed-off-by: Muhammad Usama Anjum usama.anjum@collabora.com --- tools/testing/selftests/mm/hmm-tests.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/mm/hmm-tests.c b/tools/testing/selftests/mm/hmm-tests.c index 141bf63cbe05e..3b4db583bd3b6 100644 --- a/tools/testing/selftests/mm/hmm-tests.c +++ b/tools/testing/selftests/mm/hmm-tests.c @@ -796,7 +796,7 @@ TEST_F(hmm, anon_write_hugetlbfs) int ret;
default_hsize = file_read_ulong("/proc/meminfo", "Hugepagesize:"); - if (default_hsize < 0 || default_hsize*1024 < default_hsize) + if (default_hsize*1024 < default_hsize) SKIP(return, "Huge page size could not be determined"); default_hsize = default_hsize*1024; /* KB to B */
@@ -1579,7 +1579,7 @@ TEST_F(hmm, compound) /* Skip test if we can't allocate a hugetlbfs page. */
default_hsize = file_read_ulong("/proc/meminfo", "Hugepagesize:"); - if (default_hsize < 0 || default_hsize*1024 < default_hsize) + if (default_hsize*1024 < default_hsize) SKIP(return, "Huge page size could not be determined"); default_hsize = default_hsize*1024; /* KB to B */
Fix type mismatch warnings.
Signed-off-by: Muhammad Usama Anjum usama.anjum@collabora.com --- tools/testing/selftests/mm/guard-pages.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/mm/guard-pages.c b/tools/testing/selftests/mm/guard-pages.c index ece37212a8a2e..fc1165ef2015f 100644 --- a/tools/testing/selftests/mm/guard-pages.c +++ b/tools/testing/selftests/mm/guard-pages.c @@ -142,7 +142,7 @@ TEST_F(guard_pages, basic) const unsigned long NUM_PAGES = 10; const unsigned long page_size = self->page_size; char *ptr; - int i; + unsigned int i;
ptr = mmap(NULL, NUM_PAGES * page_size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0); @@ -1044,7 +1044,7 @@ TEST_F(guard_pages, fork_cow) const unsigned long page_size = self->page_size; char *ptr; pid_t pid; - int i; + unsigned int i;
/* Map 10 pages. */ ptr = mmap(NULL, 10 * page_size, PROT_READ | PROT_WRITE,
Fix type mismatch warnings: hugetlb-madvise.c:30:25: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare] 30 | if (fhp != (exp_free)) { \ | ^~ hugetlb-madvise.c:114:9: note: in expansion of macro ‘validate_free_pages’ 114 | validate_free_pages(free_hugepages - NR_HUGE_PAGES); | ^~~~~~~~~~~~~~~~~~~
Signed-off-by: Muhammad Usama Anjum usama.anjum@collabora.com --- tools/testing/selftests/mm/hugetlb-madvise.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/mm/hugetlb-madvise.c b/tools/testing/selftests/mm/hugetlb-madvise.c index 43f16c12c8e9a..8f527084858d0 100644 --- a/tools/testing/selftests/mm/hugetlb-madvise.c +++ b/tools/testing/selftests/mm/hugetlb-madvise.c @@ -26,7 +26,7 @@
#define validate_free_pages(exp_free) \ do { \ - int fhp = get_free_hugepages(); \ + unsigned int fhp = get_free_hugepages(); \ if (fhp != (exp_free)) { \ printf("Unexpected number of free huge " \ "pages line %d\n", __LINE__); \
Fix type mismatch warnings.
Signed-off-by: Muhammad Usama Anjum usama.anjum@collabora.com --- tools/testing/selftests/mm/hugepage-vmemmap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/mm/hugepage-vmemmap.c b/tools/testing/selftests/mm/hugepage-vmemmap.c index 23e97e552057d..8d30ebfc9b86c 100644 --- a/tools/testing/selftests/mm/hugepage-vmemmap.c +++ b/tools/testing/selftests/mm/hugepage-vmemmap.c @@ -51,7 +51,8 @@ static unsigned long virt_to_pfn(void *addr)
static int check_page_flags(unsigned long pfn) { - int fd, i; + int fd; + unsigned int i; unsigned long pageflags;
fd = open("/proc/kpageflags", O_RDONLY);
Fix type mismatch warnings.
Signed-off-by: Muhammad Usama Anjum usama.anjum@collabora.com --- tools/testing/selftests/mm/hugetlb-read-hwpoison.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/mm/hugetlb-read-hwpoison.c b/tools/testing/selftests/mm/hugetlb-read-hwpoison.c index ba6cc6f9cabcd..e2a2bb1989d58 100644 --- a/tools/testing/selftests/mm/hugetlb-read-hwpoison.c +++ b/tools/testing/selftests/mm/hugetlb-read-hwpoison.c @@ -72,7 +72,7 @@ static bool seek_read_hugepage_filemap(int fd, size_t len, size_t wr_chunk_size, { char buf[MAX_WRITE_READ_CHUNK_SIZE]; ssize_t ret_count = 0; - ssize_t total_ret_count = 0; + size_t total_ret_count = 0; char val = offset / wr_chunk_size + offset % wr_chunk_size;
printf(PREFIX PREFIX "init val=%u with offset=0x%lx\n", val, offset); @@ -83,7 +83,7 @@ static bool seek_read_hugepage_filemap(int fd, size_t len, size_t wr_chunk_size, return false; }
- while (offset + total_ret_count < len) { + while ((unsigned long)offset + total_ret_count < len) { ret_count = read(fd, buf, wr_chunk_size); if (ret_count == 0) { printf(PREFIX PREFIX "read reach end of the file\n"); @@ -109,7 +109,7 @@ static bool read_hugepage_filemap(int fd, size_t len, { char buf[MAX_WRITE_READ_CHUNK_SIZE]; ssize_t ret_count = 0; - ssize_t total_ret_count = 0; + size_t total_ret_count = 0; char val = 0;
printf(PREFIX PREFIX "expect to read 0x%lx bytes of data in total\n",
Fix type mismatch warnings.
Signed-off-by: Muhammad Usama Anjum usama.anjum@collabora.com --- tools/testing/selftests/mm/khugepaged.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/tools/testing/selftests/mm/khugepaged.c b/tools/testing/selftests/mm/khugepaged.c index 8a4d34cce36b2..dde7c7fbbac2c 100644 --- a/tools/testing/selftests/mm/khugepaged.c +++ b/tools/testing/selftests/mm/khugepaged.c @@ -140,7 +140,7 @@ static void get_finfo(const char *dir) exit(EXIT_FAILURE); } if (snprintf(finfo.path, sizeof(finfo.path), "%s/" TEST_FILE, - finfo.dir) >= sizeof(finfo.path)) { + finfo.dir) >= (signed int)sizeof(finfo.path)) { printf("%s: Pathname is too long\n", __func__); exit(EXIT_FAILURE); } @@ -155,7 +155,7 @@ static void get_finfo(const char *dir) /* Find owning device's queue/read_ahead_kb control */ if (snprintf(path, sizeof(path), "/sys/dev/block/%d:%d/uevent", major(path_stat.st_dev), minor(path_stat.st_dev)) - >= sizeof(path)) { + >= (signed int)sizeof(path)) { printf("%s: Pathname is too long\n", __func__); exit(EXIT_FAILURE); } @@ -169,7 +169,7 @@ static void get_finfo(const char *dir) sizeof(finfo.dev_queue_read_ahead_path), "/sys/dev/block/%d:%d/queue/read_ahead_kb", major(path_stat.st_dev), minor(path_stat.st_dev)) - >= sizeof(finfo.dev_queue_read_ahead_path)) { + >= (signed int)sizeof(finfo.dev_queue_read_ahead_path)) { printf("%s: Pathname is too long\n", __func__); exit(EXIT_FAILURE); } @@ -197,7 +197,7 @@ static void get_finfo(const char *dir) if (snprintf(finfo.dev_queue_read_ahead_path, sizeof(finfo.dev_queue_read_ahead_path), "/sys/block/%s/queue/read_ahead_kb", - str) >= sizeof(finfo.dev_queue_read_ahead_path)) { + str) >= (signed int)sizeof(finfo.dev_queue_read_ahead_path)) { printf("%s: Pathname is too long\n", __func__); exit(EXIT_FAILURE); } @@ -271,7 +271,7 @@ static void *alloc_mapping(int nr)
static void fill_memory(int *p, unsigned long start, unsigned long end) { - int i; + unsigned int i;
for (i = start / page_size; i < end / page_size; i++) p[i * page_size / sizeof(*p)] = i + 0xdead0000; @@ -333,10 +333,10 @@ static void *alloc_hpage(struct mem_ops *ops)
static void validate_memory(int *p, unsigned long start, unsigned long end) { - int i; + unsigned int i;
for (i = start / page_size; i < end / page_size; i++) { - if (p[i * page_size / sizeof(*p)] != i + 0xdead0000) { + if ((unsigned int)p[i * page_size / sizeof(*p)] != i + 0xdead0000) { printf("Page %d is corrupted: %#x\n", i, p[i * page_size / sizeof(*p)]); exit(EXIT_FAILURE); @@ -537,7 +537,7 @@ static void madvise_collapse(const char *msg, char *p, int nr_hpages, static bool wait_for_scan(const char *msg, char *p, int nr_hpages, struct mem_ops *ops) { - int full_scans; + unsigned int full_scans; int timeout = 6; /* 3 seconds */
/* Sanity check */
Fix variable type mismatch warnings.
Signed-off-by: Muhammad Usama Anjum usama.anjum@collabora.com --- tools/testing/selftests/mm/protection_keys.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/tools/testing/selftests/mm/protection_keys.c b/tools/testing/selftests/mm/protection_keys.c index 3a66798a8e8d6..ab1e586bc2728 100644 --- a/tools/testing/selftests/mm/protection_keys.c +++ b/tools/testing/selftests/mm/protection_keys.c @@ -78,7 +78,7 @@ static void cat_into_file(char *str, char *file) }
ret = write(fd, str, strlen(str)); - if (ret != strlen(str)) { + if (ret != (signed int)strlen(str)) { perror("write to file failed"); fprintf(stderr, "filename: '%s' str: '%s'\n", file, str); exit(__LINE__); @@ -597,10 +597,10 @@ struct pkey_malloc_record *pkey_last_malloc_record; static long nr_pkey_malloc_records; void record_pkey_malloc(void *ptr, long size, int prot) { - long i; + unsigned long i; struct pkey_malloc_record *rec = NULL;
- for (i = 0; i < nr_pkey_malloc_records; i++) { + for (i = 0; i < (unsigned long)nr_pkey_malloc_records; i++) { rec = &pkey_malloc_records[i]; /* find a free record */ if (rec) @@ -866,7 +866,7 @@ static int nr_test_fds; static void __save_test_fd(int fd) { pkey_assert(fd >= 0); - pkey_assert(nr_test_fds < ARRAY_SIZE(test_fds)); + pkey_assert(nr_test_fds < (signed int)ARRAY_SIZE(test_fds)); test_fds[nr_test_fds] = fd; nr_test_fds++; } @@ -897,7 +897,7 @@ static void test_pkey_alloc_free_attach_pkey0(int *ptr, u16 __attribute__((unuse int max_nr_pkey_allocs; int alloced_pkeys[NR_PKEYS]; int nr_alloced = 0; - long size; + unsigned long size;
pkey_assert(pkey_last_malloc_record); size = pkey_last_malloc_record->size; @@ -1280,7 +1280,7 @@ static void test_pkey_init_state(int __attribute__((unused)) *ptr, u16 __attribu */ static void test_mprotect_with_pkey_0(int *ptr, u16 pkey) { - long size; + unsigned long size; int prot;
assert(pkey_last_malloc_record); @@ -1530,7 +1530,7 @@ static void test_ptrace_modifies_pkru(int __attribute__((unused)) *ptr, pkey_assert(WIFSTOPPED(status) && WSTOPSIG(status) == SIGSTOP);
xsave = (void *)malloc(xsave_size); - pkey_assert(xsave > 0); + pkey_assert(xsave != NULL);
/* Modify the PKRU register directly */ iov.iov_base = xsave; @@ -1727,7 +1727,7 @@ static void run_tests_once(void) int *ptr; int prot = PROT_READ|PROT_WRITE;
- for (test_nr = 0; test_nr < ARRAY_SIZE(pkey_tests); test_nr++) { + for (test_nr = 0; test_nr < (signed int)ARRAY_SIZE(pkey_tests); test_nr++) { int pkey; int orig_pkey_faults = pkey_faults;
Fix all the found type mismatch warnings.
Signed-off-by: Muhammad Usama Anjum usama.anjum@collabora.com --- tools/testing/selftests/mm/thuge-gen.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tools/testing/selftests/mm/thuge-gen.c b/tools/testing/selftests/mm/thuge-gen.c index e4370b79b62ff..515b89ac4eb59 100644 --- a/tools/testing/selftests/mm/thuge-gen.c +++ b/tools/testing/selftests/mm/thuge-gen.c @@ -65,7 +65,7 @@ void show(unsigned long ps) { char buf[100];
- if (ps == getpagesize()) + if ((signed long)ps == getpagesize()) return;
ksft_print_msg("%luMB: ", ps >> 20); @@ -106,7 +106,7 @@ unsigned long read_sysfs(int warn, char *fmt, ...)
unsigned long read_free(unsigned long ps) { - return read_sysfs(ps != getpagesize(), + return read_sysfs((signed long)ps != getpagesize(), "/sys/kernel/mm/hugepages/hugepages-%lukB/free_hugepages", ps >> 10); } @@ -126,7 +126,7 @@ void test_mmap(unsigned long size, unsigned flags) after = read_free(size);
show(size); - ksft_test_result(size == getpagesize() || (before - after) == NUM_PAGES, + ksft_test_result((signed long)size == getpagesize() || (before - after) == NUM_PAGES, "%s mmap\n", __func__);
if (munmap(map, size * NUM_PAGES)) @@ -164,7 +164,7 @@ void test_shmget(unsigned long size, unsigned flags) after = read_free(size);
show(size); - ksft_test_result(size == getpagesize() || (before - after) == NUM_PAGES, + ksft_test_result((signed long)size == getpagesize() || (before - after) == NUM_PAGES, "%s: mmap\n", __func__); if (shmdt(map)) ksft_exit_fail_msg("%s: shmdt: %s\n", __func__, strerror(errno)); @@ -173,7 +173,7 @@ void test_shmget(unsigned long size, unsigned flags) void find_pagesizes(void) { unsigned long largest = getpagesize(); - int i; + unsigned int i; glob_t g;
glob("/sys/kernel/mm/hugepages/hugepages-*kB", 0, NULL, &g);
Fix all type mismatch warnings in all uffd-* files.
Signed-off-by: Muhammad Usama Anjum usama.anjum@collabora.com --- tools/testing/selftests/mm/uffd-common.c | 6 +++--- tools/testing/selftests/mm/uffd-stress.c | 2 +- tools/testing/selftests/mm/uffd-unit-tests.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/tools/testing/selftests/mm/uffd-common.c b/tools/testing/selftests/mm/uffd-common.c index c15674a60f299..47bdcb47481ae 100644 --- a/tools/testing/selftests/mm/uffd-common.c +++ b/tools/testing/selftests/mm/uffd-common.c @@ -450,7 +450,7 @@ void uffd_handle_page_fault(struct uffd_msg *msg, struct uffd_args *args) args->wp_faults++; } else if (msg->arg.pagefault.flags & UFFD_PAGEFAULT_FLAG_MINOR) { uint8_t *area; - int b; + unsigned int b;
/* * Minor page faults @@ -621,7 +621,7 @@ int __copy_page(int ufd, unsigned long offset, bool retry, bool wp) err("UFFDIO_COPY error: %"PRId64, (int64_t)uffdio_copy.copy); wake_range(ufd, uffdio_copy.dst, page_size); - } else if (uffdio_copy.copy != page_size) { + } else if (uffdio_copy.copy != (signed long)page_size) { err("UFFDIO_COPY error: %"PRId64, (int64_t)uffdio_copy.copy); } else { if (test_uffdio_copy_eexist && retry) { @@ -655,7 +655,7 @@ int move_page(int ufd, unsigned long offset, unsigned long len) err("UFFDIO_MOVE error: %"PRId64, (int64_t)uffdio_move.move); wake_range(ufd, uffdio_move.dst, len); - } else if (uffdio_move.move != len) { + } else if (uffdio_move.move != (signed long)len) { err("UFFDIO_MOVE error: %"PRId64, (int64_t)uffdio_move.move); } else return 1; diff --git a/tools/testing/selftests/mm/uffd-stress.c b/tools/testing/selftests/mm/uffd-stress.c index 1270ff3104cc6..5509ec32c3290 100644 --- a/tools/testing/selftests/mm/uffd-stress.c +++ b/tools/testing/selftests/mm/uffd-stress.c @@ -77,7 +77,7 @@ static void usage(void)
static void uffd_stats_reset(struct uffd_args *args, unsigned long n_cpus) { - int i; + unsigned int i;
for (i = 0; i < n_cpus; i++) { args[i].cpu = i; diff --git a/tools/testing/selftests/mm/uffd-unit-tests.c b/tools/testing/selftests/mm/uffd-unit-tests.c index 81b315bedb744..c3d59ec754040 100644 --- a/tools/testing/selftests/mm/uffd-unit-tests.c +++ b/tools/testing/selftests/mm/uffd-unit-tests.c @@ -917,7 +917,7 @@ static bool do_uffdio_zeropage(int ufd, bool has_zeropage) else if (res != -EINVAL) err("UFFDIO_ZEROPAGE not -EINVAL"); } else if (has_zeropage) { - if (res != page_size) + if (res != (signed long)page_size) err("UFFDIO_ZEROPAGE unexpected size"); else retry_uffdio_zeropage(ufd, &uffdio_zeropage); @@ -949,7 +949,7 @@ uffd_register_detect_zeropage(int uffd, void *addr, uint64_t len) static void uffd_zeropage_test(uffd_test_args_t __attribute__((unused)) *args) { bool has_zeropage; - int i; + unsigned int i;
has_zeropage = uffd_register_detect_zeropage(uffd, area_dst, page_size); if (area_dst_alias) @@ -997,7 +997,7 @@ static void do_uffdio_poison(int uffd, unsigned long offset)
if (ret) err("UFFDIO_POISON error: %"PRId64, (int64_t)res); - else if (res != page_size) + else if (res != (signed long)page_size) err("UFFDIO_POISON unexpected size: %"PRId64, (int64_t)res); }
Add the compiler flags to catch warnings during development.
Signed-off-by: Muhammad Usama Anjum usama.anjum@collabora.com --- tools/testing/selftests/mm/Makefile | 1 + 1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/mm/Makefile b/tools/testing/selftests/mm/Makefile index 63ce39d024bb5..006ed2e8df87e 100644 --- a/tools/testing/selftests/mm/Makefile +++ b/tools/testing/selftests/mm/Makefile @@ -34,6 +34,7 @@ endif MAKEFLAGS += --no-builtin-rules
CFLAGS = -Wall -O2 -I $(top_srcdir) $(EXTRA_CFLAGS) $(KHDR_INCLUDES) $(TOOLS_INCLUDES) +CFLAGS += -Wunreachable-code -Wunused -Wunused-parameter -Wunused-function -Wunused-variable LDLIBS = -lrt -lpthread -lm
# Some distributions (such as Ubuntu) configure GCC so that _FORTIFY_SOURCE is
On Thu, 9 Jan 2025 22:38:26 +0500 Muhammad Usama Anjum usama.anjum@collabora.com wrote:
Recently, I reviewed a patch on the mm/kselftest mailing list about a test which had obvious type mismatch fix in it. It was strange why that wasn't caught during development and when patch was accepted. This led me to discover that those extra compiler options to catch these warnings aren't being used. When I added them, I found tens of warnings in just mm suite.
In this series, I'm fixing those warnings. The last check adds the compiler flags with which the warnings have been caught.
I'm seeing a couple of unresolved issues against this series so I'll drop v1. Please let's revisit after -rc1.
https://lkml.kernel.org/r/20250110190057.2294fd5a@pumpkin https://lkml.kernel.org/r/d9c290e2-f22d-41be-aa68-2aebd3eb1a67@sirena.org.uk
linux-kselftest-mirror@lists.linaro.org