* [PATCH] tools headers: Update the include/vdso/unaligned.h to sync headers
@ 2025-04-21 3:41 Athira Rajeev
2025-04-22 9:11 ` James Clark
0 siblings, 1 reply; 3+ messages in thread
From: Athira Rajeev @ 2025-04-21 3:41 UTC (permalink / raw)
To: acme, jolsa, adrian.hunter, irogers, namhyung
Cc: linux-perf-users, linuxppc-dev, maddy, atrajeev, disgoel,
hbathini, Aditya.Bodkhe1, jiang.peng9, venkat88, Tejas.Manhas1,
Athira Rajeev
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
Reported-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
Signed-off-by: Athira Rajeev <atrajeev@linux.ibm.com>
Tested-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
---
tools/include/vdso/unaligned.h | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tools/include/vdso/unaligned.h b/tools/include/vdso/unaligned.h
index eee3d2a4dbe4..ff0c06b6513e 100644
--- a/tools/include/vdso/unaligned.h
+++ b/tools/include/vdso/unaligned.h
@@ -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 */
--
2.47.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] tools headers: Update the include/vdso/unaligned.h to sync headers
2025-04-21 3:41 [PATCH] tools headers: Update the include/vdso/unaligned.h to sync headers Athira Rajeev
@ 2025-04-22 9:11 ` James Clark
2025-04-25 14:46 ` Athira Rajeev
0 siblings, 1 reply; 3+ messages in thread
From: James Clark @ 2025-04-22 9:11 UTC (permalink / raw)
To: Athira Rajeev
Cc: linux-perf-users, linuxppc-dev, maddy, atrajeev, disgoel,
hbathini, Aditya.Bodkhe1, jiang.peng9, venkat88, Tejas.Manhas1,
acme, jolsa, adrian.hunter, irogers, namhyung
On 21/04/2025 4:41 am, Athira Rajeev wrote:
> 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
>
> Reported-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
> Signed-off-by: Athira Rajeev <atrajeev@linux.ibm.com>
> Tested-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
> ---
> tools/include/vdso/unaligned.h | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/tools/include/vdso/unaligned.h b/tools/include/vdso/unaligned.h
> index eee3d2a4dbe4..ff0c06b6513e 100644
> --- a/tools/include/vdso/unaligned.h
> +++ b/tools/include/vdso/unaligned.h
> @@ -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 */
Reviewed-by: James Clark <james.clark@linaro.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] tools headers: Update the include/vdso/unaligned.h to sync headers
2025-04-22 9:11 ` James Clark
@ 2025-04-25 14:46 ` Athira Rajeev
0 siblings, 0 replies; 3+ messages in thread
From: Athira Rajeev @ 2025-04-25 14:46 UTC (permalink / raw)
To: James Clark, Arnaldo Carvalho de Melo, Namhyung Kim
Cc: open list:PERFORMANCE EVENTS SUBSYSTEM, linuxppc-dev,
Madhavan Srinivasan, Athira Rajeev, Disha Goel, hbathini,
Aditya.Bodkhe1, jiang.peng9, Venkat Rao Bagalkote, Tejas Manhas,
Arnaldo Carvalho de Melo, Jiri Olsa, Adrian Hunter, Ian Rogers,
Namhyung Kim
> On 22 Apr 2025, at 2:41 PM, James Clark <james.clark@linaro.org> wrote:
>
>
>
> On 21/04/2025 4:41 am, Athira Rajeev wrote:
>> 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
>> Reported-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
>> Signed-off-by: Athira Rajeev <atrajeev@linux.ibm.com>
>> Tested-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
>> ---
>> tools/include/vdso/unaligned.h | 12 ++++++------
>> 1 file changed, 6 insertions(+), 6 deletions(-)
>> diff --git a/tools/include/vdso/unaligned.h b/tools/include/vdso/unaligned.h
>> index eee3d2a4dbe4..ff0c06b6513e 100644
>> --- a/tools/include/vdso/unaligned.h
>> +++ b/tools/include/vdso/unaligned.h
>> @@ -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 */
>
> Reviewed-by: James Clark <james.clark@linaro.org>
Hi,
Looking for feedback on this change.
Thanks
Athira
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-04-25 14:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-21 3:41 [PATCH] tools headers: Update the include/vdso/unaligned.h to sync headers Athira Rajeev
2025-04-22 9:11 ` James Clark
2025-04-25 14:46 ` Athira Rajeev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).