Re: [PATCH] scsi_debug: Fix compilation error on 32bits arch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



	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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux