[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191028200700.213753-2-bvanassche@acm.org>
Date: Mon, 28 Oct 2019 13:06:52 -0700
From: Bart Van Assche <bvanassche@....org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Ingo Molnar <mingo@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Christoph Hellwig <hch@....de>,
"Martin K . Petersen" <martin.petersen@...cle.com>,
linux-kernel@...r.kernel.org, linux-scsi@...r.kernel.org,
Bart Van Assche <bvanassche@....org>,
Harvey Harrison <harvey.harrison@...il.com>,
"H . Peter Anvin" <hpa@...or.com>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: [PATCH 1/9] linux/unaligned/byteshift.h: Remove superfluous casts
The C language supports casting a void pointer into a non-void pointer
implicitly. Remove explicit void pointer to non-void pointer casts because
these are superfluous.
Cc: Harvey Harrison <harvey.harrison@...il.com>
Cc: Ingo Molnar <mingo@...nel.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: H. Peter Anvin <hpa@...or.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Signed-off-by: Bart Van Assche <bvanassche@....org>
---
include/linux/unaligned/be_byteshift.h | 6 +++---
include/linux/unaligned/le_byteshift.h | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/include/linux/unaligned/be_byteshift.h b/include/linux/unaligned/be_byteshift.h
index 8bdb8fa01bd4..c43ff5918c8a 100644
--- a/include/linux/unaligned/be_byteshift.h
+++ b/include/linux/unaligned/be_byteshift.h
@@ -40,17 +40,17 @@ static inline void __put_unaligned_be64(u64 val, u8 *p)
static inline u16 get_unaligned_be16(const void *p)
{
- return __get_unaligned_be16((const u8 *)p);
+ return __get_unaligned_be16(p);
}
static inline u32 get_unaligned_be32(const void *p)
{
- return __get_unaligned_be32((const u8 *)p);
+ return __get_unaligned_be32(p);
}
static inline u64 get_unaligned_be64(const void *p)
{
- return __get_unaligned_be64((const u8 *)p);
+ return __get_unaligned_be64(p);
}
static inline void put_unaligned_be16(u16 val, void *p)
diff --git a/include/linux/unaligned/le_byteshift.h b/include/linux/unaligned/le_byteshift.h
index 1628b75866f0..2248dcb0df76 100644
--- a/include/linux/unaligned/le_byteshift.h
+++ b/include/linux/unaligned/le_byteshift.h
@@ -40,17 +40,17 @@ static inline void __put_unaligned_le64(u64 val, u8 *p)
static inline u16 get_unaligned_le16(const void *p)
{
- return __get_unaligned_le16((const u8 *)p);
+ return __get_unaligned_le16(p);
}
static inline u32 get_unaligned_le32(const void *p)
{
- return __get_unaligned_le32((const u8 *)p);
+ return __get_unaligned_le32(p);
}
static inline u64 get_unaligned_le64(const void *p)
{
- return __get_unaligned_le64((const u8 *)p);
+ return __get_unaligned_le64(p);
}
static inline void put_unaligned_le16(u16 val, void *p)
--
2.24.0.rc0.303.g954a862665-goog
Powered by blists - more mailing lists