[merged mm-nonmm-stable] lib-checksum-use-array_size-to-improve-assert_setup_correct.patch removed from -mm tree

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

 



The quilt patch titled
     Subject: lib: checksum: use ARRAY_SIZE() to improve assert_setup_correct()
has been removed from the -mm tree.  Its filename was
     lib-checksum-use-array_size-to-improve-assert_setup_correct.patch

This patch was dropped because it was merged into the mm-nonmm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Thorsten Blum <thorsten.blum@xxxxxxxxxx>
Subject: lib: checksum: use ARRAY_SIZE() to improve assert_setup_correct()
Date: Fri, 26 Jul 2024 17:49:46 +0200

Use ARRAY_SIZE() to simplify the assert_setup_correct() function and
improve its readability.

Link: https://lkml.kernel.org/r/20240726154946.230928-1-thorsten.blum@xxxxxxxxxx
Signed-off-by: Thorsten Blum <thorsten.blum@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 lib/checksum_kunit.c |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

--- a/lib/checksum_kunit.c~lib-checksum-use-array_size-to-improve-assert_setup_correct
+++ a/lib/checksum_kunit.c
@@ -468,12 +468,9 @@ static __wsum to_wsum(u32 x)
 
 static void assert_setup_correct(struct kunit *test)
 {
-	CHECK_EQ(sizeof(random_buf) / sizeof(random_buf[0]), MAX_LEN);
-	CHECK_EQ(sizeof(expected_results) / sizeof(expected_results[0]),
-		 MAX_LEN);
-	CHECK_EQ(sizeof(init_sums_no_overflow) /
-			 sizeof(init_sums_no_overflow[0]),
-		 MAX_LEN);
+	CHECK_EQ(ARRAY_SIZE(random_buf), MAX_LEN);
+	CHECK_EQ(ARRAY_SIZE(expected_results), MAX_LEN);
+	CHECK_EQ(ARRAY_SIZE(init_sums_no_overflow), MAX_LEN);
 }
 
 /*
_

Patches currently in -mm which might be from thorsten.blum@xxxxxxxxxx are

mm-shrinker-use-min-to-improve-shrinker_debugfs_scan_write.patch





[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux