Re: [PATCH] perf/x86: Rename bts_buffer variables and use struct_size()
From: Peter Zijlstra
Date: Tue Apr 01 2025 - 10:20:27 EST
On Mon, Mar 31, 2025 at 02:29:38PM +0200, Thorsten Blum wrote:
> Rename struct bts_buffer objects from 'buf' to 'bb' to improve the
> readability when accessing the structure's 'buf' member. For example,
> 'buf->buf[]' becomes 'bb->buf[]'.
>
> 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()).
>
> Indent line 327 using tabs to silence a checkpatch warning.
>
> No functional changes intended.
This is two things, as such should be two patches. Also, meh. This is
going to create extra work for the arch-pebs guys I suppose.