linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nios2: clean up warnings found by checkpatch
@ 2022-05-29 15:25 XueBing Chen
  0 siblings, 0 replies; only message in thread
From: XueBing Chen @ 2022-05-29 15:25 UTC (permalink / raw)
  To: dinguyen; +Cc: linux-kernel


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@jari.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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-29 15:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-29 15:25 [PATCH] nios2: clean up warnings found by checkpatch XueBing Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).