From nobody Tue Apr 28 18:07:17 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 B8B03C433F5 for ; Sun, 29 May 2022 15:31:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231160AbiE2PbD (ORCPT ); Sun, 29 May 2022 11:31:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231154AbiE2PbB (ORCPT ); Sun, 29 May 2022 11:31:01 -0400 Received: from jari.cn (unknown [218.92.28.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AB9F83FBC4 for ; Sun, 29 May 2022 08:31:00 -0700 (PDT) Received: by ajax-webmail-localhost.localdomain (Coremail) ; Sun, 29 May 2022 23:25:54 +0800 (GMT+08:00) X-Originating-IP: [182.148.15.20] Date: Sun, 29 May 2022 23:25:54 +0800 (GMT+08:00) X-CM-HeaderCharset: UTF-8 From: "XueBing Chen" To: dinguyen@kernel.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH] nios2: 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: <3132c1c.a93.181106c7d36.Coremail.chenxuebing@jari.cn> X-Coremail-Locale: zh_CN X-CM-TRANSID: AQAAfwD3AG+CkJNisyc6AA--.685W X-CM-SenderInfo: hfkh05pxhex0nj6mt2flof0/1tbiAQABCmFEYxsmmAACsr 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 'unsigned long' over 'unsigned long int' as the int is unnecessary - WARNING: Prefer 'long' over 'long int' as the int is unnecessary - WARNING: Prefer 'unsigned int' to bare use of 'unsigned' Signed-off-by: XueBing Chen --- arch/nios2/lib/memcpy.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/nios2/lib/memcpy.c b/arch/nios2/lib/memcpy.c index 1715f5d28b11..25a541b609ba 100644 --- a/arch/nios2/lib/memcpy.c +++ b/arch/nios2/lib/memcpy.c @@ -22,7 +22,7 @@ /* Type to use for aligned memory operations. This should normally be the biggest type supported by a single load and store. */ -#define op_t unsigned long int +#define op_t unsigned long #define OPSIZ (sizeof(op_t)) =20 /* Optimal type for storing bytes in registers. */ @@ -69,7 +69,7 @@ do { \ block beginning at DSTP with LEN `op_t' words (not LEN bytes!). Both SRCP and DSTP should be aligned for memory operations on `op_t's. = */ /* stream-lined (read x8 + write x8) */ -static void _wordcopy_fwd_aligned(long int dstp, long int srcp, size_t len) +static void _wordcopy_fwd_aligned(long dstp, long srcp, size_t len) { while (len > 7) { register op_t a0, a1, a2, a3, a4, a5, a6, a7; @@ -109,7 +109,7 @@ static void _wordcopy_fwd_aligned(long int dstp, long i= nt srcp, size_t len) DSTP should be aligned for memory operations on `op_t's, but SRCP must *not* be aligned. */ /* stream-lined (read x4 + write x4) */ -static void _wordcopy_fwd_dest_aligned(long int dstp, long int srcp, +static void _wordcopy_fwd_dest_aligned(long dstp, long srcp, size_t len) { op_t ap; @@ -159,8 +159,8 @@ static void _wordcopy_fwd_dest_aligned(long int dstp, l= ong int srcp, =20 void *memcpy(void *dstpp, const void *srcpp, size_t len) { - unsigned long int dstp =3D (long int) dstpp; - unsigned long int srcp =3D (long int) srcpp; + unsigned long dstp =3D (long) dstpp; + unsigned long srcp =3D (long) srcpp; =20 /* Copy from the beginning to the end. */ =20 @@ -191,10 +191,10 @@ void *memcpy(void *dstpp, const void *srcpp, size_t l= en) return dstpp; } =20 -void *memcpyb(void *dstpp, const void *srcpp, unsigned len) +void *memcpyb(void *dstpp, const void *srcpp, unsigned int len) { - unsigned long int dstp =3D (long int) dstpp; - unsigned long int srcp =3D (long int) srcpp; + unsigned long dstp =3D (long) dstpp; + unsigned long srcp =3D (long) srcpp; =20 BYTE_COPY_FWD(dstp, srcp, len); =20 --=20 2.36.1