[<prev] [next>] [day] [month] [year] [list]
Message-ID: <3132c1c.a93.181106c7d36.Coremail.chenxuebing@jari.cn>
Date: Sun, 29 May 2022 23:25:54 +0800 (GMT+08:00)
From: "XueBing Chen" <chenxuebing@...i.cn>
To: dinguyen@...nel.org
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH] nios2: clean up warnings found by checkpatch
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 <chenxuebing@...i.cn>
---
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))
/* 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 int 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, long int srcp,
void *memcpy(void *dstpp, const void *srcpp, size_t len)
{
- unsigned long int dstp = (long int) dstpp;
- unsigned long int srcp = (long int) srcpp;
+ unsigned long dstp = (long) dstpp;
+ unsigned long srcp = (long) srcpp;
/* Copy from the beginning to the end. */
@@ -191,10 +191,10 @@ void *memcpy(void *dstpp, const void *srcpp, size_t len)
return dstpp;
}
-void *memcpyb(void *dstpp, const void *srcpp, unsigned len)
+void *memcpyb(void *dstpp, const void *srcpp, unsigned int len)
{
- unsigned long int dstp = (long int) dstpp;
- unsigned long int srcp = (long int) srcpp;
+ unsigned long dstp = (long) dstpp;
+ unsigned long srcp = (long) srcpp;
BYTE_COPY_FWD(dstp, srcp, len);
--
2.36.1
Powered by blists - more mailing lists