@@ -217,7 +217,7 @@ static void xrgb8888_to_rgb332_test(struct kunit *test)
drm_fb_xrgb8888_to_rgb332(dst, result->dst_pitch, src, &fb,
¶ms->clip);
- KUNIT_EXPECT_EQ(test, memcmp(dst, result->expected, dst_size), 0);
+ KUNIT_EXPECT_MEMEQ(test, dst, result->expected, dst_size);
}
static void xrgb8888_to_rgb565_test(struct kunit *test)
@@ -245,11 +245,11 @@ static void xrgb8888_to_rgb565_test(struct kunit *test)
drm_fb_xrgb8888_to_rgb565(dst, result->dst_pitch, src, &fb,
¶ms->clip, false);
- KUNIT_EXPECT_EQ(test, memcmp(dst, result->expected, dst_size), 0);
+ KUNIT_EXPECT_MEMEQ(test, dst, result->expected, dst_size);
drm_fb_xrgb8888_to_rgb565(dst, result->dst_pitch, src, &fb,
¶ms->clip, true);
- KUNIT_EXPECT_EQ(test, memcmp(dst, result->expected_swab, dst_size), 0);
+ KUNIT_EXPECT_MEMEQ(test, dst, result->expected_swab, dst_size);
}
static struct kunit_case drm_format_helper_test_cases[] = {
@@ -71,11 +71,11 @@ static void dev_addr_test_basic(struct kunit *test)
memset(addr, 2, sizeof(addr));
eth_hw_addr_set(netdev, addr);
- KUNIT_EXPECT_EQ(test, 0, memcmp(netdev->dev_addr, addr, sizeof(addr)));
+ KUNIT_EXPECT_MEMEQ(test, netdev->dev_addr, addr, sizeof(addr));
memset(addr, 3, sizeof(addr));
dev_addr_set(netdev, addr);
- KUNIT_EXPECT_EQ(test, 0, memcmp(netdev->dev_addr, addr, sizeof(addr)));
+ KUNIT_EXPECT_MEMEQ(test, netdev->dev_addr, addr, sizeof(addr));
}
static void dev_addr_test_sync_one(struct kunit *test)