From nobody Tue Feb 10 16:24:01 2026 Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) (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 BA59E27B34C for ; Tue, 3 Feb 2026 01:40:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770082852; cv=none; b=jyBKgyUSGPZ4HsnauEaGogAbC/WGMMj3J/W12DIXXva/n/xxwZtliEgEVbIMARufviPwi3mN5+vG4Luwg4dCsk8ZDnTlgA6vp6UjLdtfuXiNKmQVafnvzS43/sWF82hgl+nodJVpxgcaMmSSiaBXli16vOhQWQcukl1Ai9nzNuI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770082852; c=relaxed/simple; bh=FLAahLjJ0r/1h66Zsu9dP6qKGZbQ+zbQvStCKsDGmJg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=tds7Z1nCRKAGt2tUh2gZgulWFrcqUglLyLtHxMHL6U/VqUGdotBUMvl/JaKDyYPnZpeNWai+PLedXi3QN6CP38WamWDgJrO2D5L9ouRsgxA2T/ihEwLfbDOXeZKYDZ35mqSEAlkcGukJPXv5+09a0zQRpo/Ea+DsYZ+7UVj9INM= 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=m9/u1QlJ; arc=none smtp.client-ip=209.85.221.50 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="m9/u1QlJ" Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-42fb2314f52so2939422f8f.0 for ; Mon, 02 Feb 2026 17:40:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770082849; x=1770687649; 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=etTDPmqrNlniwtg8lStWsxBo5qlcWCBuglfV1xZZX94=; b=m9/u1QlJbDU7UEk78+pyYUFJSvVSTNqrOhnhhn5HXThMKutgnY01xRbllGm9MuMdDU 4A1MGRzcmcnX36MgBpiW5o3aI3+k0XbeDowVQwTmWs0QVOOjB61DKUXsKWVNai0Pgo85 n8pcrTHwpwESYVOv7dXxmevcXAL1448LOB1vz5iJK78Ng1Aoh4w2e1ai3NMRBr2dSQKs fDJFHGoqonMVnrUDkc5XrZe73ZxKRmKesWOI5gl2HeNZWsLqiADVpD17DSeKoaUqRu3M 5E4scn95/T023NCTOUoZXD4MluQdbmRlp5Dbb9qJ+CyKSxJLz9EWKw8ln5gfW2ZKO7jY QQ9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770082849; x=1770687649; 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=etTDPmqrNlniwtg8lStWsxBo5qlcWCBuglfV1xZZX94=; b=Yb9Tczf3dxMS5zmIPTtQi9B9yvXXl2pXsbNEXg4a6cuBT4zkESQnmhRsg00L51XjdX WKmppwDoU8X1/nHT4kaTRjckPNXfsva1gInDOeM5L8qP9nvyuecD0zIWkmPxHx2Z1eUh CDgV5Vjcxy2+nTAMAvzw3pWdjpUrTBDlotWWnKnoDbBSPMwQb8JXrZ19VGQe5OvdMcK6 iay0gKg2JeOrqZ37jwUNrhSz2XDOEBSnmjYs0qF3nxByTMBwvH7xpRPg0r39IhqMoDtK daGIzdKW7TQRQEeNQ4zUerj1RN7Ixc30WKmySOVQTp8GUsSk871Z8/HHWwHfaEOkcUVQ ALQw== X-Gm-Message-State: AOJu0YyKQSl5T5OgAbYolmV+JzMv1PHy38NAXX36WFoZL/AxpJ/Yaogs cgPaDF3CkAaoBE/MtNr2JwJ0Ldc+QrCQf6yp+mnnJljWm3yt6VMCc48nFqOzhFqI X-Gm-Gg: AZuq6aIVOBc4zL2Oeqb9Rr7wsTrdBsNx5unmrXj+qu3070BrSW+mhcmGpJjzGXcSDuu VNam7ebZ0+BshPqwGFyeRt5HUnB7Ra1fv2geLabYx7r6YaLAwtiBKnPWOQvG6jrYTO/c7SUzkrK cF5kbpyKQEyR7Rj/OuS3GU7uKn5xC2CdMmEC475HjTh9SJ2U79JVFFY3imrGST+Yrg8ZYc8+Pn0 Rhl1G47bFjj4fcdUjZV7S+z1ksTsRl4dyjvU8WwEmEfDcPzbp3dFD3+Exev+9ulKY+PcVnmrJrI ehyWytWGLfuMVA5GNKtcRspwIT5lbH9cuPsOvf8/3L/7AgvFLEba9sDfXG7JWarXmDylXnJaXZB 4hRlXor5HGQgWNZZDSsKQ9okm/StTg7tiuv20LyexoblsKWSlW0/4fiw56a8G5ZfcGJdSdg3ONb FfukO7ZNca6p5LaxOVa02Kkzgnhlkmn7XTgmtnXjctNFmw9cAgt3dOuw1HC2xp9g== X-Received: by 2002:a05:6000:26c1:b0:431:9d7:5c2e with SMTP id ffacd0b85a97d-435f3aaa6c1mr20930652f8f.35.1770082848736; Mon, 02 Feb 2026 17:40:48 -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 ffacd0b85a97d-435e10e474csm46640550f8f.2.2026.02.02.17.40.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Feb 2026 17:40:48 -0800 (PST) From: Titouan Ameline de Cadeville X-Google-Original-From: Titouan Ameline de Cadeville To: linux-kernel@vger.kernel.org Cc: kees@kernel.org, davidgow@google.com, raemoar63@gmail.com, eleanor.lin@realtek.com, visitorckw@gmail.com, Titouan Ameline de Cadeville Subject: [PATCH v2] lib: math: tests: drop unnecessary KUnit param_value casts Date: Tue, 3 Feb 2026 02:38:45 +0100 Message-ID: <20260203013845.27618-1-titouan.ameline-de-cadeville@epita.fr> 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. Signed-off-by: Titouan Ameline de Cadeville Reviewed-by: David Gow --- 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