lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230819195005.99387-1-mahmoudmatook.mm@gmail.com>
Date:   Sat, 19 Aug 2023 23:50:03 +0400
From:   Mahmoud Maatuq <mahmoudmatook.mm@...il.com>
To:     linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
        kuba@...nel.org, netdev@...r.kernel.org,
        willemdebruijn.kernel@...il.com, davem@...emloft.net,
        pabeni@...hat.com, edumazet@...gle.com, shuah@...nel.org
Cc:     linux-kernel-mentees@...ts.linuxfoundation.org,
        Mahmoud Maatuq <mahmoudmatook.mm@...il.com>
Subject: [PATCH 0/2] selftests: Introduce common min()/max() and apply them in net tests

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ