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

From: Tejun Heo

Date: Mon Sep 21 2026 - 15:38:05 EST


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.

--
tejun