Skip to content

Commit 4f208b4

Browse files
andy-shevjfvogel
authored andcommitted
types: Complement the aligned types with signed 64-bit one
[ Upstream commit e4ca0e5 ] Some user may want to use aligned signed 64-bit type. Provide it for them. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20240903180218.3640501-2-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Stable-dep-of: 1bb9422 ("iio: accel: adxl355: Make timestamp 64-bit aligned using aligned_s64") Signed-off-by: Sasha Levin <sashal@kernel.org> (cherry picked from commit afe884959738067d68e17400f50c3795ab5fb85d) Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
1 parent 25e1838 commit 4f208b4

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

include/linux/types.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,9 @@ typedef u64 u_int64_t;
115115
typedef s64 int64_t;
116116
#endif
117117

118-
/* this is a special 64bit data type that is 8-byte aligned */
118+
/* These are the special 64-bit data types that are 8-byte aligned */
119119
#define aligned_u64 __aligned_u64
120+
#define aligned_s64 __aligned_s64
120121
#define aligned_be64 __aligned_be64
121122
#define aligned_le64 __aligned_le64
122123

include/uapi/linux/types.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ typedef __u32 __bitwise __wsum;
5353
* No conversions are necessary between 32-bit user-space and a 64-bit kernel.
5454
*/
5555
#define __aligned_u64 __u64 __attribute__((aligned(8)))
56+
#define __aligned_s64 __s64 __attribute__((aligned(8)))
5657
#define __aligned_be64 __be64 __attribute__((aligned(8)))
5758
#define __aligned_le64 __le64 __attribute__((aligned(8)))
5859

0 commit comments

Comments
 (0)