From: "XueBing Chen" <chenxuebing@jari.cn>
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
Date: Sun, 29 May 2022 23:06:53 +0800 (GMT+08:00) [thread overview]
Message-ID: <6f4b4fa8.a91.181105b1395.Coremail.chenxuebing@jari.cn> (raw)
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 <chenxuebing@jari.cn>
---
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"
static void log2_kernel(FPU_REG const *arg, u_char argsign,
- Xsig * accum_result, long int *expon);
+ Xsig * accum_result, long *expon);
/*--- 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 st1_sign)
exponent = exponent16(st0_ptr);
/* 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) = -significand(st0_ptr);
setexponent16(&x, -1);
@@ -104,10 +104,10 @@ void poly_l2(FPU_REG *st0_ptr, FPU_REG *st1_ptr, u_char 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;
if (exponent16(st0_ptr) < 0) {
@@ -180,9 +180,9 @@ static const unsigned long leadterm = 0xb8000000;
| log2(x+1) |
+---------------------------------------------------------------------------*/
static void log2_kernel(FPU_REG const *arg, u_char argsign, Xsig *accum_result,
- long int *expon)
+ long *expon)
{
- long int exponent, adj;
+ long exponent, adj;
unsigned long long Xsq;
Xsig accumulator, Numer, Denom, argSignif, arg_signif;
@@ -210,7 +210,7 @@ static void log2_kernel(FPU_REG const *arg, u_char argsign, Xsig *accum_result,
#ifndef PECULIAR_486
/* Should check here that |local_arg| is within the valid range */
if (exponent >= -2) {
- if ((exponent > -2) || (argSignif.msw > (unsigned)0xafb0ccc0)) {
+ if ((exponent > -2) || (argSignif.msw > 0xafb0ccc0U)) {
/* The argument is too large */
}
}
--
2.36.1
reply other threads:[~2022-05-29 15:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6f4b4fa8.a91.181105b1395.Coremail.chenxuebing@jari.cn \
--to=chenxuebing@jari.cn \
--cc=billm@melbpc.org.au \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®