On 4/3/24 01:42, Damien Le Moal wrote:
+ zone_append_max_bytes = + ALIGN_DOWN(dev->zone_append_max_sectors << SECTOR_SHIFT, + dev->blocksize); + dev->zone_append_max_sectors = + min(zone_append_max_bytes >> SECTOR_SHIFT, zone_capacity_sects);
I think the above code can be simplified to the following: dev->zone_append_max_sectors = min(ALIGN_DOWN(dev->zone_append_max_sectors, dev->blocksize >> SECTOR_SHIFT), zone_capacity_sects); Anyway: Reviewed-by: Bart Van Assche <bvanassche@xxxxxxx>