summaryrefslogtreecommitdiff
path: root/lib/checksum_kunit.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-04-23 14:16:03 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-04-23 14:16:03 +0300
commitdf1aa5b0d1a69b93d1371063299e42dcc56cbe7b (patch)
tree8e84f62c45a49099782d0a97f5568b9a43702272 /lib/checksum_kunit.c
parentebbc1a4789c666846b9854ef845a37a64879e5f9 (diff)
parented30a4a51bb196781c8058073ea720133a65596f (diff)
downloadlinux-df1aa5b0d1a69b93d1371063299e42dcc56cbe7b.tar.xz
Merge 6.9-rc5 into char-misc-next
We need the char/misc fixes in here as well to work off of. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/checksum_kunit.c')
-rw-r--r--lib/checksum_kunit.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/checksum_kunit.c b/lib/checksum_kunit.c
index bf70850035c7..404dba36bae3 100644
--- a/lib/checksum_kunit.c
+++ b/lib/checksum_kunit.c
@@ -594,13 +594,15 @@ static void test_ip_fast_csum(struct kunit *test)
static void test_csum_ipv6_magic(struct kunit *test)
{
-#if defined(CONFIG_NET)
const struct in6_addr *saddr;
const struct in6_addr *daddr;
unsigned int len;
unsigned char proto;
__wsum csum;
+ if (!IS_ENABLED(CONFIG_NET))
+ return;
+
const int daddr_offset = sizeof(struct in6_addr);
const int len_offset = sizeof(struct in6_addr) + sizeof(struct in6_addr);
const int proto_offset = sizeof(struct in6_addr) + sizeof(struct in6_addr) +
@@ -618,7 +620,6 @@ static void test_csum_ipv6_magic(struct kunit *test)
CHECK_EQ(to_sum16(expected_csum_ipv6_magic[i]),
csum_ipv6_magic(saddr, daddr, len, proto, csum));
}
-#endif /* !CONFIG_NET */
}
static struct kunit_case __refdata checksum_test_cases[] = {