Re: [PATCH] perf/x86: Rename bts_buffer variables and use struct_size()

From: Liang, Kan
Date: Tue Apr 01 2025 - 11:40:35 EST


+ Dapeng

On 2025-04-01 10:20 a.m., Peter Zijlstra wrote:
> 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.
>

I think the patch only changes the internal variables, while the
arch-pebs only touch the external interfaces. It should be less effort
to re-base.

Thanks,
Kan