On Thu, Apr 10, 2025 at 09:30:20PM +0800, Ming Lei wrote: > + struct elev_change_ctx ctx = { > + .name = "none", > + .force = 1, > + .uevent = 1, > + }; > > mutex_lock(&q->elevator_lock); > if (q->elevator && !blk_queue_dying(q)) > + ctx.name = q->elevator->type->elevator_name; > + __elevator_change(q, &ctx); > mutex_unlock(&q->elevator_lock); Can we have this whole code section in a helper in elevator.c and keep the low-level __elevator_change function private there? > +/* Holding data for changing elevator */ > +struct elev_change_ctx { > + const char *name; > + unsigned int force:1; > + unsigned int uevent:1; Using an integer type for flags is odd. This should a boolean, or even better aflags field with flag names. And I think with the flag names we can just pass the name and the flags and do away with the separate structure entirely.