From nobody Sat Feb 7 09:46:43 2026 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CBD09325738 for ; Tue, 3 Feb 2026 17:31:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770139917; cv=none; b=LAYADgoOUj8JZBZPrNUtgqboW0jLqokekmMTt2acZP6GWMB6YEim/gBEor9JRkuUs3q2UP7ir0QNR/cXJAUVadE87qvypeD+3Pw2VlFBzWBo1CIgj90M3AXz2t1i5bpifCOn4kDEg2qHPr4f8k1p/43Rcbu0E92FCTVDuKk924g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770139917; c=relaxed/simple; bh=uNXxK7WLHpMlPbgY+TeUY0Z5PZ32vbrTx+aEsPz338A=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=XQCed57XYyqCnrNGn2TCHvtWpRYZR5ZtlcBlcFGj1UWHd1LIQPjN/n2zvRhTRN9iKvYX5Cf+9JpWjPpioXuYLuLvvGIfaDiNpjQq8Q6iVCtF/IHLXM/TdfMCTUXENoQOfLAk9XnbLUiqn55Vow0I3XKrkkDq98CODRzEDMTqaCQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=XwvGPHYD; arc=none smtp.client-ip=209.85.128.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XwvGPHYD" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-47ff94b46afso444675e9.1 for ; Tue, 03 Feb 2026 09:31:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770139913; x=1770744713; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=rBtQI5zA6navMOTUiG7Qoh+HnLf7L+vzMhsUMoPDOV0=; b=XwvGPHYDPucmETXRESZsxhLGcjyWUmAcSS2nIOo1VZDxC/GyZwdnrcn10epfOYDVNg ydVOAZRKokd0iNU/tDPtV7JrZc47t52MyX9uH7M3QQC9TKMxPustL2nysbagoJ/6iSGE Yaws6IYmA9ax9DZot0h560KHJ1q5Jwc6yemFXlE75yIiwpyvm+q0JHASBQsVXiIYKMKH InLumb1v9Pd6dRbjkMInUPUGPAXXzCv2RI7w6c4nFUJdmFt3VfFT/GMwT9oZgGwa2mMc fT3zEUykA1z41+M6WGrO1GwSnNRQaaLnrwEq2zu12xUjNDKdQeKTTmQ5JWNtKzmLordC aE9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770139913; x=1770744713; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=rBtQI5zA6navMOTUiG7Qoh+HnLf7L+vzMhsUMoPDOV0=; b=bK1GSPGMD6rgL+pv+cDVqzO0BG1mjxlIDTIcrhLGt19/NfXjdsES0HauXs0gVxPdck 0GejIYCrIAd5PBTy9cVZBXHTnWjRCz1CrNwsSnjdmoif/JYwkz91gSUhVlOA819AAtWF TmGtQKYSvdP10d252OzPtfrszNIFZI2DWEBbnimDqkWpHBAKOh9DKwzcZ37/p6Tu4LDt dd/0XMml9bzFkV9v4E/T0C1d2nSYqa2NUIhomyYb/Zed8eaYcOgyuSTsCQFXZ97yXdRV NY8G3kzQvtv7bpGaI0E0M8OD7n2kBT+VPgjRbQueqTJIXCGOTK3hGgjavN3jai52C9eP YjeA== X-Gm-Message-State: AOJu0Ywy3IK5fiECtnIGkysZocal6jed2P/WnT5eDe69+D4SPa7C/P/d GFNa1gMs2yaefqvHPI4ThFrWahiz3GKzRjr9mxB4ZizE6bmfNoN7B4bYQr551A== X-Gm-Gg: AZuq6aIwMFzufV++uq4M2XrjhwTrtCuApAEu4Rv1PaKH36ZJhbWq/iBdaLA8uXd/7Uv vn9ptYjtq5RhD349u8edw3g7Fb4hJbZh3Rbjoh9CbkYa5YgypUjzlHnes5CVaRKxKcx/Xt9/j3C ZkjwlzBBfb/sWtADHbHK+1wo3r6DlZEFc24yx0LmoVvb+HPQpmqTEsejwCpjXT42yUCvdGCHSih L0sVuMoD7RozHOgzWi43qpoq7skUCbD7jMigZAb8Ue6z+AsdgYeAMbQyuBP7BpUb7RxDrr1OTYP o1DP/IKUiJ0DYDXUFZiIvg5dTkrf33dxh1mqdgCgZk8wEA3/uZ0SOAbX87uvRNq1h/h3tEmeU5Z xN8DXIfF+GzhdMoFci0k0b+Yp9loMpeJ+jkrTA0UV4QMVCTJ4L0Ov33v4jhbFx+ZRoEH+6gp9E0 nXlo8eSh90ylUnpMQILfEaAnAHpRTxwnotyCnkYNTySA0yMw== X-Received: by 2002:a05:600c:8904:b0:47f:1332:e5f with SMTP id 5b1f17b1804b1-4830516490bmr49787005e9.12.1770139912880; Tue, 03 Feb 2026 09:31:52 -0800 (PST) Received: from nixos.numericable.fr (38.42.3.89.rev.sfr.net. [89.3.42.38]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48305129321sm74868525e9.4.2026.02.03.09.31.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Feb 2026 09:31:52 -0800 (PST) From: Titouan Ameline de Cadeville To: linux-kernel@vger.kernel.org Cc: linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, davidgow@google.com, raemoar63@gmail.com, kees@kernel.org, eleanor.lin@realtek.com, visitorckw@gmail.com, Titouan Ameline de Cadeville Subject: [PATCH v5] lib: math: tests: drop unnecessary KUnit param_value casts Date: Tue, 3 Feb 2026 18:30:40 +0100 Message-ID: <20260203173040.42158-1-titouan.ameline@gmail.com> X-Mailer: git-send-email 2.44.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Drop unnecessary casts from KUnit parameter access since param_value is a void *. This improves readability and follows common kernel style. No functional change. Reviewed-by: David Gow Signed-off-by: Titouan Ameline de Cadeville --- Changes in v5: - Use consistent email address in From/Author/Signed-off-by (titouan.amelin= e@gmail.com). - Add version changelog below the '---' line. lib/math/tests/gcd_kunit.c | 2 +- lib/math/tests/int_log_kunit.c | 4 ++-- lib/math/tests/int_pow_kunit.c | 2 +- lib/math/tests/int_sqrt_kunit.c | 2 +- lib/math/tests/rational_kunit.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/math/tests/gcd_kunit.c b/lib/math/tests/gcd_kunit.c index ede1883583b1..b9c9b8758991 100644 --- a/lib/math/tests/gcd_kunit.c +++ b/lib/math/tests/gcd_kunit.c @@ -34,7 +34,7 @@ KUNIT_ARRAY_PARAM(gcd, params, get_desc); =20 static void gcd_test(struct kunit *test) { - const struct test_case_params *tc =3D (const struct test_case_params *)te= st->param_value; + const struct test_case_params *tc =3D test->param_value; =20 KUNIT_EXPECT_EQ(test, tc->expected_result, gcd(tc->val1, tc->val2)); } diff --git a/lib/math/tests/int_log_kunit.c b/lib/math/tests/int_log_kunit.c index 14e854146cb4..9f9b48232701 100644 --- a/lib/math/tests/int_log_kunit.c +++ b/lib/math/tests/int_log_kunit.c @@ -43,7 +43,7 @@ KUNIT_ARRAY_PARAM(intlog2, intlog2_params, get_desc); =20 static void intlog2_test(struct kunit *test) { - const struct test_case_params *tc =3D (const struct test_case_params *)te= st->param_value; + const struct test_case_params *tc =3D test->param_value; =20 KUNIT_EXPECT_EQ(test, tc->expected_result, intlog2(tc->value)); } @@ -52,7 +52,7 @@ KUNIT_ARRAY_PARAM(intlog10, intlog10_params, get_desc); =20 static void intlog10_test(struct kunit *test) { - const struct test_case_params *tc =3D (const struct test_case_params *)te= st->param_value; + const struct test_case_params *tc =3D test->param_value; =20 KUNIT_EXPECT_EQ(test, tc->expected_result, intlog10(tc->value)); } diff --git a/lib/math/tests/int_pow_kunit.c b/lib/math/tests/int_pow_kunit.c index 34b33677d458..ef9c8a9bd8ac 100644 --- a/lib/math/tests/int_pow_kunit.c +++ b/lib/math/tests/int_pow_kunit.c @@ -31,7 +31,7 @@ KUNIT_ARRAY_PARAM(int_pow, params, get_desc); =20 static void int_pow_test(struct kunit *test) { - const struct test_case_params *tc =3D (const struct test_case_params *)te= st->param_value; + const struct test_case_params *tc =3D test->param_value; =20 KUNIT_EXPECT_EQ(test, tc->expected_result, int_pow(tc->base, tc->exponent= )); } diff --git a/lib/math/tests/int_sqrt_kunit.c b/lib/math/tests/int_sqrt_kuni= t.c index 1798e1312eb7..9c46024b0fc1 100644 --- a/lib/math/tests/int_sqrt_kunit.c +++ b/lib/math/tests/int_sqrt_kunit.c @@ -45,7 +45,7 @@ KUNIT_ARRAY_PARAM(int_sqrt, params, get_desc); =20 static void int_sqrt_test(struct kunit *test) { - const struct test_case_params *tc =3D (const struct test_case_params *)te= st->param_value; + const struct test_case_params *tc =3D test->param_value; =20 KUNIT_EXPECT_EQ(test, tc->expected_result, int_sqrt(tc->x)); } diff --git a/lib/math/tests/rational_kunit.c b/lib/math/tests/rational_kuni= t.c index 47486a95f088..b05587a1e90a 100644 --- a/lib/math/tests/rational_kunit.c +++ b/lib/math/tests/rational_kunit.c @@ -33,7 +33,7 @@ KUNIT_ARRAY_PARAM(rational, test_parameters, get_desc); =20 static void rational_test(struct kunit *test) { - const struct rational_test_param *param =3D (const struct rational_test_p= aram *)test->param_value; + const struct rational_test_param *param =3D test->param_value; unsigned long n =3D 0, d =3D 0; =20 rational_best_approximation(param->num, param->den, param->max_num, param= ->max_den, &n, &d); --=20 2.44.2