[PATCH v3 4/8] selftests/mm: Add -Wunused family of flags
David Hildenbrand
david at redhat.com
Tue Aug 26 00:45:40 PDT 2025
On 25.08.25 20:21, John Hubbard wrote:
> On 8/22/25 1:21 AM, Muhammad Usama Anjum wrote:
> ...
>> diff --git a/tools/testing/selftests/mm/compaction_test.c b/tools/testing/selftests/mm/compaction_test.c
>> index 9bc4591c7b169..4fa03679e9b07 100644
>> --- a/tools/testing/selftests/mm/compaction_test.c
>> +++ b/tools/testing/selftests/mm/compaction_test.c
>> @@ -203,7 +203,7 @@ int set_zero_hugepages(unsigned long *initial_nr_hugepages)
>> return ret;
>> }
>>
>> -int main(int argc, char **argv)
>> +int main(void)
>
> Hi Muhammad,
>
> This is not helpful nor desirable, in selftest code.
>
> In fact, I think this particular patch is actually a solid
> illustration of why you probably should just abandon the -Wunused
> flag in kselftests.
>
> Skimming through the other patches doesn't change my initial
> impression, either. This is adding churn and admin overhead,
> but for test code there is basically no benefit here. Certainly
> not enough to be worth it.
Fully agreed.
--
Cheers
David / dhildenb
More information about the linux-riscv
mailing list