lkml.org 
[lkml]   [2023]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH 0/2] selftests: Introduce common min()/max() and apply them in net tests
Date
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

\
 
 \ /
  Last update: 2023-08-20 02:11    [W:0.062 / U:0.524 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site