lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250603132414.3676142-1-julian@outer-limits.org>
Date: Tue,  3 Jun 2025 15:24:14 +0200
From: Julian Vetter <julian@...er-limits.org>
To: Arnd Bergmann <arnd@...db.de>,
	"Jason A . Donenfeld" <Jason@...c4.com>,
	Christophe Leroy <christophe.leroy@...roup.eu>,
	Al Viro <viro@...iv.linux.org.uk>
Cc: linux-kernel@...r.kernel.org,
	Julian Vetter <julian@...er-limits.org>
Subject: [PATCH] Remove unaligned/packed_struct.h header

The functions in this header are deprecated and are not used anymore.
So, remove the header entirely.

Signed-off-by: Julian Vetter <julian@...er-limits.org>
---
 include/linux/unaligned.h               |  1 -
 include/linux/unaligned/packed_struct.h | 46 -------------------------
 2 files changed, 47 deletions(-)
 delete mode 100644 include/linux/unaligned/packed_struct.h

diff --git a/include/linux/unaligned.h b/include/linux/unaligned.h
index 4a9651017e3c..18c4b0c00e2a 100644
--- a/include/linux/unaligned.h
+++ b/include/linux/unaligned.h
@@ -6,7 +6,6 @@
  * This is the most generic implementation of unaligned accesses
  * and should work almost anywhere.
  */
-#include <linux/unaligned/packed_struct.h>
 #include <asm/byteorder.h>
 #include <vdso/unaligned.h>
 
diff --git a/include/linux/unaligned/packed_struct.h b/include/linux/unaligned/packed_struct.h
deleted file mode 100644
index f4c8eaf4d012..000000000000
--- a/include/linux/unaligned/packed_struct.h
+++ /dev/null
@@ -1,46 +0,0 @@
-#ifndef _LINUX_UNALIGNED_PACKED_STRUCT_H
-#define _LINUX_UNALIGNED_PACKED_STRUCT_H
-
-#include <linux/types.h>
-
-struct __una_u16 { u16 x; } __packed;
-struct __una_u32 { u32 x; } __packed;
-struct __una_u64 { u64 x; } __packed;
-
-static inline u16 __get_unaligned_cpu16(const void *p)
-{
-	const struct __una_u16 *ptr = (const struct __una_u16 *)p;
-	return ptr->x;
-}
-
-static inline u32 __get_unaligned_cpu32(const void *p)
-{
-	const struct __una_u32 *ptr = (const struct __una_u32 *)p;
-	return ptr->x;
-}
-
-static inline u64 __get_unaligned_cpu64(const void *p)
-{
-	const struct __una_u64 *ptr = (const struct __una_u64 *)p;
-	return ptr->x;
-}
-
-static inline void __put_unaligned_cpu16(u16 val, void *p)
-{
-	struct __una_u16 *ptr = (struct __una_u16 *)p;
-	ptr->x = val;
-}
-
-static inline void __put_unaligned_cpu32(u32 val, void *p)
-{
-	struct __una_u32 *ptr = (struct __una_u32 *)p;
-	ptr->x = val;
-}
-
-static inline void __put_unaligned_cpu64(u64 val, void *p)
-{
-	struct __una_u64 *ptr = (struct __una_u64 *)p;
-	ptr->x = val;
-}
-
-#endif /* _LINUX_UNALIGNED_PACKED_STRUCT_H */
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ