On Sat, Jul 04, 2026 at 12:17:40PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> On 15.04.26 18:24, Raphael Norwitz wrote:
> > > diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c
> > > index c151e836770..23f910d9fe3 100644
> > > --- a/hw/block/vhost-user-blk.c
> > > +++ b/hw/block/vhost-user-blk.c
> > > @@ -65,6 +65,11 @@ static void vhost_user_blk_update_config(VirtIODevice
> > > *vdev, uint8_t *config)
> > > /* Our num_queues overrides the device backend */
> > > virtio_stw_p(vdev, &s->blkcfg.num_queues, s->num_queues);
> > >
> > > + if (s->seg_max_adjust) {
> >
> > NIT: declaration at the top of the function
>
> Hmm, no, accordingly to docs/dev/style.rst, "at the beginning of blocks",
> so, it's OK to declare it at top of if-block, it's often used in the code,
> look at output of `git grep -B 3 '^ int '` for example.
indeed.
> >
> > > + uint32_t seg_max = MIN(s->blkcfg.seg_max, s->queue_size - 2);
if you respon pls add an empty line here.
> > > + virtio_stl_p(vdev, &s->blkcfg.seg_max, seg_max);
> > > + }
>
>
> --
> Best regards,
> Vladimir