Hi Damien, On Thu, 7 May 2020, Damien Le Moal wrote:
Allowing a non-power-of-2 zone size forces the use of direct division operations of 64bits sector values to obtain a zone number or number of zones. Doing so without using do_div() leads to compilation errors on 32bits architecture.
As reported by noreply@xxxxxxxxxxxxxx for m68k-allmodconfig: ERROR: modpost: "__udivdi3" [drivers/scsi/scsi_debug.ko] undefined!
Devices with a zone size that is not a power of 2 do not exist today so allowing their emulation is of limited interest, as the sd driver will not support them anyway. So to fix this compilation error, instead of using do_div() for sector values divisions, simply disallow zone size values that are not a power of 2 value, allowing to use bitshift for divisions in all cases. Fixes: 98e0a689868c ("scsi: scsi_debug: Add zone_size_mb module parameter") Fixes: f0d1cf9378bd ("scsi: scsi_debug: Add ZBC zone commands") Signed-off-by: Damien Le Moal <damien.lemoal@xxxxxxx>
And your patch fixes that, so Acked-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds