diff options
author | Thorsten Blum <thorsten.blum@linux.dev> | 2025-04-13 12:41:09 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2025-04-13 21:05:50 +0200 |
commit | 5c3627b6f0595f1ec27e6f5df903bd072e9b9136 (patch) | |
tree | b6077062e310ba46150e5aee35f2895fd7c4d7f9 /scripts/lib/kdoc/kdoc_files.py | |
parent | 1734d98fbcce343eafba16e18e3a3001b3e94ab5 (diff) |
perf/x86/intel/bts: Replace offsetof() with struct_size()
Use struct_size() to calculate the number of bytes to allocate for a new
bts_buffer. Compared to offsetof(), struct_size() provides additional
compile-time checks (e.g., __must_be_array()).
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20250413104108.49142-2-thorsten.blum@linux.dev
Diffstat (limited to 'scripts/lib/kdoc/kdoc_files.py')
0 files changed, 0 insertions, 0 deletions