summaryrefslogtreecommitdiff
path: root/include/linux/unaligned
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2020-03-13 23:30:58 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2020-03-17 05:08:32 +0300
commit19f747f7370fcf4ced4988ed795ccd4a28f2b530 (patch)
tree4f50292263ef94ba8fa5f46b8e99ae86d68a4606 /include/linux/unaligned
parent6fdb79ff27ee0d385ec8481458d2fd1d69fec50b (diff)
downloadlinux-19f747f7370fcf4ced4988ed795ccd4a28f2b530.tar.xz
scsi: linux/unaligned/byteshift.h: Remove superfluous casts
The C language supports implicitly casting a void pointer into a non-void pointer. Remove explicit void pointer to non-void pointer casts because these are superfluous. Link: https://lore.kernel.org/r/20200313203102.16613-2-bvanassche@acm.org Cc: Harvey Harrison <harvey.harrison@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/linux/unaligned')
-rw-r--r--include/linux/unaligned/be_byteshift.h6
-rw-r--r--include/linux/unaligned/le_byteshift.h6
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)