tools headers: Update the include/vdso/unaligned.h to sync headers
PATCH 1/1 tools headers: Update the include/vdso/unaligned.h to sync headers
To pick up the changes in:
commit acea9943271b ("vdso: Address variable shadowing in macros")
Addressing this perf tools build warning:
diff -u tools/include/vdso/unaligned.h include/vdso/unaligned.h
--- tools/include/vdso/unaligned.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
tools/include/vdso/unaligned.h +6 -6
@@ -2,14 +2,14 @@#ifndef __VDSO_UNALIGNED_H#define __VDSO_UNALIGNED_H -#define __get_unaligned_t (type, ptr) ({ \ - const struct { type x; } __packed *__pptr = (typeof(__pptr))(ptr); \ - __pptr->x; \ +#define __get_unaligned_t (type, ptr) ({ \ + const struct { type x; } __packed * __get_pptr = (typeof(__get_pptr))(ptr); \ + __get_pptr->x; \ }) -#define __put_unaligned_t (type, val, ptr) do { \ - struct { type x; } __packed *__pptr = (typeof(__pptr))(ptr); \ - __pptr->x = (val); \ +#define __put_unaligned_t (type, val, ptr) do { \ + struct { type x; } __packed * __put_pptr = (typeof(__put_pptr))(ptr); \ + __put_pptr->x = (val); \ } while (0)#endif /* __VDSO_UNALIGNED_H */
Signature · 1 line
2.47.1
Quoted 29 lines · Athira Rajeev
To pick up the changes in:
commitacea9943271b("vdso: Address variable shadowing in macros")Addressing this perf tools build warning:
diff -u
tools/include/vdso/unaligned.hinclude/vdso/unaligned.hReported-by Venkat Rao Bagalkote <[email protected]>Signed-off-by Athira Rajeev <[email protected]>Tested-by Venkat Rao Bagalkote <[email protected]>--- tools/include/vdso/unaligned.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)tools/include/vdso/unaligned.h +3
-3@@ -2,14 +2,14 @@#ifndef __VDSO_UNALIGNED_H#define __VDSO_UNALIGNED_H -#define __get_unaligned_t (type, ptr) ({ \ - const struct { type x; } __packed *__pptr = (typeof(__pptr))(ptr); \ - __pptr->x; \ +#define __get_unaligned_t (type, ptr) ({ \ + const struct { type x; } __packed * __get_pptr = (typeof(__get_pptr))(ptr); \ + __get_pptr->x; \ })
tools/include/vdso/unaligned.h line 15
Quoted 10 lines
tools/include/vdso/unaligned.h +3
-3-#define __put_unaligned_t (type, val, ptr) do { \ - struct { type x; } __packed *__pptr = (typeof(__pptr))(ptr); \ - __pptr->x = (val); \ +#define __put_unaligned_t (type, val, ptr) do { \ + struct { type x; } __packed * __put_pptr = (typeof(__put_pptr))(ptr); \ + __put_pptr->x = (val); \ } while (0)#endif /* __VDSO_UNALIGNED_H */
Quoted 33 lines · James Clark
Quoted 26 lines · Athira Rajeev
To pick up the changes in:
commitacea9943271b("vdso: Address variable shadowing in macros") Addressing this perf tools build warning:
diff -utools/include/vdso/unaligned.hinclude/vdso/unaligned.hReported-by Venkat Rao Bagalkote <[email protected]>Signed-off-by Athira Rajeev <[email protected]>Tested-by Venkat Rao Bagalkote <[email protected]>--- tools/include/vdso/unaligned.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)tools/include/vdso/unaligned.h +3
-3@@ -2,14 +2,14 @@#ifndef __VDSO_UNALIGNED_H#define __VDSO_UNALIGNED_H -#define __get_unaligned_t(type, ptr) ({ \ - const struct { type x; } __packed *__pptr = (typeof(__pptr))(ptr); \ - __pptr->x; \ +#define __get_unaligned_t(type, ptr) ({ \ + const struct { type x; } __packed * __get_pptr = (typeof(__get_pptr))(ptr); \ + __get_pptr->x; \ }) -#define __put_unaligned_t(type, val, ptr) do { \ - struct { type x; } __packed *__pptr = (typeof(__pptr))(ptr); \
Quoted 8 lines
tools/include/vdso/unaligned.h line 15
Quoted 6 lines
tools/include/vdso/unaligned.h +3
-1- __pptr->x = (val); \ +#define __put_unaligned_t (type, val, ptr) do { \ + struct { type x; } __packed * __put_pptr = (typeof(__put_pptr))(ptr); \ + __put_pptr->x = (val); \ } while (0)#endif /* __VDSO_UNALIGNED_H */ Reviewed-by James Clark <[email protected]>
Hi,
Looking for feedback on this change.
Thanks
Athira