On Mon, Nov 03, 2025 at 03:08:30PM +0900, Damien Le Moal wrote:
> On 11/1/25 06:40, Bart Van Assche wrote:
> >> +/**
> >> + * blkdev_get_zone_info - Get a zone information from cached data
> > 
> > "Get a zone information" -> "Get zone information"
> > 
> >> +  sector = sector & (~(zone_sectors - 1));
> > 
> > Please consider changing the above assignment into:
> > 
> >     sector -= bdev_offset_from_zone_start(bdev, sector);
> 
> That is a lot more arithmetic for the same thing.
> If anything, I think this should be:
> 
>       sector = ALIGN(sector, zone_sectors);

That would have to be ALIGN_DOWN I think.  Which sounds useful to
clean things up to me.


Reply via email to