public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH sched_ext/for-7.1] tools/sched_ext: Add explicit cast from void* in RESIZE_ARRAY()
@ 2026-04-13 15:50 Kuba Piecuch
  2026-04-13 16:21 ` Tejun Heo
  0 siblings, 1 reply; 2+ messages in thread
From: Kuba Piecuch @ 2026-04-13 15:50 UTC (permalink / raw)
  To: Tejun Heo, Andrea Righi, Changwoo Min, David Vernet
  Cc: linux-kernel, sched-ext, Kuba Piecuch

This fixes the following compilation error when using the header from
C++ code:

  error: assigning to 'struct scx_flux__data_uei_dump *' from
  incompatible type 'void *'

Signed-off-by: Kuba Piecuch <jpiecuch@google.com>
---
 tools/sched_ext/include/scx/common.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/sched_ext/include/scx/common.h b/tools/sched_ext/include/scx/common.h
index 823251fc47151..60f5513787d66 100644
--- a/tools/sched_ext/include/scx/common.h
+++ b/tools/sched_ext/include/scx/common.h
@@ -67,6 +67,7 @@ typedef int64_t s64;
 		bpf_map__set_value_size((__skel)->maps.elfsec##_##arr,			\
 				sizeof((__skel)->elfsec##_##arr->arr[0]) * (n));	\
 		(__skel)->elfsec##_##arr =						\
+			(typeof((__skel)->elfsec##_##arr))				\
 			bpf_map__initial_value((__skel)->maps.elfsec##_##arr, &__sz);	\
 	} while (0)
 
-- 
2.53.0.1213.gd9a14994de-goog


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH sched_ext/for-7.1] tools/sched_ext: Add explicit cast from void* in RESIZE_ARRAY()
  2026-04-13 15:50 [PATCH sched_ext/for-7.1] tools/sched_ext: Add explicit cast from void* in RESIZE_ARRAY() Kuba Piecuch
@ 2026-04-13 16:21 ` Tejun Heo
  0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2026-04-13 16:21 UTC (permalink / raw)
  To: Kuba Piecuch, Andrea Righi, Changwoo Min, David Vernet
  Cc: linux-kernel, sched-ext

Hello,

> Kuba Piecuch (1): tools/sched_ext: Add explicit cast from void* in
>  RESIZE_ARRAY()

Applied to sched_ext/for-7.1.

Thanks.
--
tejun

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-04-13 16:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-13 15:50 [PATCH sched_ext/for-7.1] tools/sched_ext: Add explicit cast from void* in RESIZE_ARRAY() Kuba Piecuch
2026-04-13 16:21 ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox