Skip to content

Commit fdd0ae7

Browse files
committed
perf tools headers: update the asm-generic/unaligned.h copy with the kernel sources
To pick up the changes in: 1ab33c0 ("asm-generic: make sparse happy with odd-sized put_unaligned_*()") Addressing this perf tools build warning: Warning: Kernel ABI header differences: diff -u tools/include/asm-generic/unaligned.h include/asm-generic/unaligned.h Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Ian Rogers <irogers@google.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lore.kernel.org/lkml/Zbp9I7rmFj1Owhug@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 1f8c43b commit fdd0ae7

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

tools/include/asm-generic/unaligned.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ static inline u32 get_unaligned_le24(const void *p)
105105

106106
static inline void __put_unaligned_be24(const u32 val, u8 *p)
107107
{
108-
*p++ = val >> 16;
109-
*p++ = val >> 8;
110-
*p++ = val;
108+
*p++ = (val >> 16) & 0xff;
109+
*p++ = (val >> 8) & 0xff;
110+
*p++ = val & 0xff;
111111
}
112112

113113
static inline void put_unaligned_be24(const u32 val, void *p)
@@ -117,9 +117,9 @@ static inline void put_unaligned_be24(const u32 val, void *p)
117117

118118
static inline void __put_unaligned_le24(const u32 val, u8 *p)
119119
{
120-
*p++ = val;
121-
*p++ = val >> 8;
122-
*p++ = val >> 16;
120+
*p++ = val & 0xff;
121+
*p++ = (val >> 8) & 0xff;
122+
*p++ = (val >> 16) & 0xff;
123123
}
124124

125125
static inline void put_unaligned_le24(const u32 val, void *p)
@@ -129,12 +129,12 @@ static inline void put_unaligned_le24(const u32 val, void *p)
129129

130130
static inline void __put_unaligned_be48(const u64 val, u8 *p)
131131
{
132-
*p++ = val >> 40;
133-
*p++ = val >> 32;
134-
*p++ = val >> 24;
135-
*p++ = val >> 16;
136-
*p++ = val >> 8;
137-
*p++ = val;
132+
*p++ = (val >> 40) & 0xff;
133+
*p++ = (val >> 32) & 0xff;
134+
*p++ = (val >> 24) & 0xff;
135+
*p++ = (val >> 16) & 0xff;
136+
*p++ = (val >> 8) & 0xff;
137+
*p++ = val & 0xff;
138138
}
139139

140140
static inline void put_unaligned_be48(const u64 val, void *p)

0 commit comments

Comments
 (0)