From nobody Sun May 3 11:10:46 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 20711C433F5 for ; Sun, 29 May 2022 15:12:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230507AbiE2PMU (ORCPT ); Sun, 29 May 2022 11:12:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229741AbiE2PMS (ORCPT ); Sun, 29 May 2022 11:12:18 -0400 Received: from jari.cn (unknown [218.92.28.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4900413E04 for ; Sun, 29 May 2022 08:12:15 -0700 (PDT) Received: by ajax-webmail-localhost.localdomain (Coremail) ; Sun, 29 May 2022 23:06:53 +0800 (GMT+08:00) X-Originating-IP: [182.148.15.20] Date: Sun, 29 May 2022 23:06:53 +0800 (GMT+08:00) X-CM-HeaderCharset: UTF-8 From: "XueBing Chen" To: billm@melbpc.org.au, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org Cc: hpa@zytor.com, linux-kernel@vger.kernel.org Subject: [PATCH] x86: clean up warnings found by checkpatch X-Priority: 3 X-Mailer: Coremail Webmail Server Version XT6.0.1 build 20210329(c53f3fee) Copyright (c) 2002-2022 www.mailtech.cn mispb-4e503810-ca60-4ec8-a188-7102c18937cf-zhkzyfz.cn Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Message-ID: <6f4b4fa8.a91.181105b1395.Coremail.chenxuebing@jari.cn> X-Coremail-Locale: zh_CN X-CM-TRANSID: AQAAfwA3QnANjJNigCY6AA--.694W X-CM-SenderInfo: hfkh05pxhex0nj6mt2flof0/1tbiAQARCmFEYxslrwAFsI X-Coremail-Antispam: 1Ur529EdanIXcx71UUUUU7IcSsGvfJ3iIAIbVAYjsxI4VWxJw CS07vEb4IE77IF4wCS07vE1I0E4x80FVAKz4kxMIAIbVAFxVCaYxvI4VCIwcAKzIAtYxBI daVFxhVjvjDU= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Clean up a handful of checkpatch warnings: - WARNING: Prefer 'long' over 'long int' as the int is unnecessary - ERROR: "foo * bar" should be "foo *bar" - WARNING: Unnecessary typecast of c90 int constant - '(unsigned int)0xb504f334' could be '0xb504f334U' - WARNING: Unnecessary typecast of c90 int constant - '(unsigned int)0xafb0ccc0' could be '0xafb0ccc0U' Signed-off-by: XueBing Chen --- arch/x86/math-emu/poly_l2.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/x86/math-emu/poly_l2.c b/arch/x86/math-emu/poly_l2.c index 98b6949bb854..ffb5d84467d6 100644 --- a/arch/x86/math-emu/poly_l2.c +++ b/arch/x86/math-emu/poly_l2.c @@ -19,14 +19,14 @@ #include "poly.h" =20 static void log2_kernel(FPU_REG const *arg, u_char argsign, - Xsig * accum_result, long int *expon); + Xsig * accum_result, long *expon); =20 /*--- poly_l2() ----------------------------------------------------------= ---+ | Base 2 logarithm by a polynomial approximation. = | +------------------------------------------------------------------------= ---*/ void poly_l2(FPU_REG *st0_ptr, FPU_REG *st1_ptr, u_char st1_sign) { - long int exponent, expon, expon_expon; + long exponent, expon, expon_expon; Xsig accumulator, expon_accum, yaccum; u_char sign, argsign; FPU_REG x; @@ -35,7 +35,7 @@ void poly_l2(FPU_REG *st0_ptr, FPU_REG *st1_ptr, u_char s= t1_sign) exponent =3D exponent16(st0_ptr); =20 /* From st0_ptr, make a number > sqrt(2)/2 and < sqrt(2) */ - if (st0_ptr->sigh > (unsigned)0xb504f334) { + if (st0_ptr->sigh > 0xb504f334U) { /* Treat as sqrt(2)/2 < st0_ptr < 1 */ significand(&x) =3D -significand(st0_ptr); setexponent16(&x, -1); @@ -104,10 +104,10 @@ void poly_l2(FPU_REG *st0_ptr, FPU_REG *st1_ptr, u_ch= ar st1_sign) | log2(x+1) = | +------------------------------------------------------------------------= ---*/ int poly_l2p1(u_char sign0, u_char sign1, - FPU_REG * st0_ptr, FPU_REG * st1_ptr, FPU_REG * dest) + FPU_REG *st0_ptr, FPU_REG *st1_ptr, FPU_REG *dest) { u_char tag; - long int exponent; + long exponent; Xsig accumulator, yaccum; =20 if (exponent16(st0_ptr) < 0) { @@ -180,9 +180,9 @@ static const unsigned long leadterm =3D 0xb8000000; | log2(x+1) = | +------------------------------------------------------------------------= ---*/ static void log2_kernel(FPU_REG const *arg, u_char argsign, Xsig *accum_re= sult, - long int *expon) + long *expon) { - long int exponent, adj; + long exponent, adj; unsigned long long Xsq; Xsig accumulator, Numer, Denom, argSignif, arg_signif; =20 @@ -210,7 +210,7 @@ static void log2_kernel(FPU_REG const *arg, u_char args= ign, Xsig *accum_result, #ifndef PECULIAR_486 /* Should check here that |local_arg| is within the valid range */ if (exponent >=3D -2) { - if ((exponent > -2) || (argSignif.msw > (unsigned)0xafb0ccc0)) { + if ((exponent > -2) || (argSignif.msw > 0xafb0ccc0U)) { /* The argument is too large */ } } --=20 2.36.1