[PATCH 0/2] selftests: Introduce common min()/max() and apply them in net tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The first patch introduces a common definition of 
the min() and max() macros for use in multiple files under selftests. 
This avoids the redundancy of having scattered local definitions 
and prepares the groundwork for other files to simply include kselftest.h.

The second patch then applies these new macros in the selftests/net files, 
replacing the ternary operations. This directly addresses several 
coccicheck warnings, making the code cleaner and more maintainable

Mahmoud Maatuq (2):
  selftests: Provide local define of min() and max()
  selftests/net: replace ternary operator with min()/max()

 tools/testing/selftests/kselftest.h           | 7 +++++++
 tools/testing/selftests/net/Makefile          | 2 ++
 tools/testing/selftests/net/so_txtime.c       | 7 ++++---
 tools/testing/selftests/net/udpgso_bench_tx.c | 6 +++---
 4 files changed, 16 insertions(+), 6 deletions(-)

-- 
2.34.1




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux