Re: [RFC PATCH v6 1/5] blk-iocost: add BPF struct_ops cost model support

From: Tao Cui

Date: Tue Sep 22 2026 - 10:01:44 EST


Hello, Tejun.

在 2026/9/22 03:37, Tejun Heo 写道:
> Hello, Tao.
>
> On Fri, 18 Sep 2026 13:49:57 +0800, Tao Cui wrote:
>
>> + mutex_lock(&iocost_bpf_reg_lock);
>> + {
>> + struct iocost_bpf_model *other;
>> +
>> + list_for_each_entry(other, &iocost_bpf_models, list) {
>
> No need for a block to scope a variable. Declare it at the top of the
> function, or in the body if it has to sit inside an #ifdef block. Same for
> the other blocks in this patch and the cursor block in the 2x example
> model.
>

Thanks, fixed. The scopes used only to declare local variables are
removed and the declarations moved up, including the cursor block in
the 2x example model.

Thanks,
Tao

> Thanks.
>
> --
> tejun