brektrou / rtl8821CU

Realtek RTL8811CU/RTL8821CU USB Wi-Fi adapter driver for Linux
GNU General Public License v2.0
1.6k stars 462 forks source link

issue #92: don't require floor() and ceil() functions #93

Closed pprindeville closed 3 years ago

pprindeville commented 3 years ago

Since these are trivial functions implemented as macros and using integer conversion, did that.

Note that we correct the value of the ceil() function for negative values (i.e. while the ceil(-5.0) == -5.0, the ceil(-5.1) == -5.0 also, and not -6.0 as was being returned).

Unless you wanted sign(x) * ceil(abs(x)) which is something else entirely.

pprindeville commented 3 years ago

I don't think ARM64 will allow us to build kernel code without -mgeneral-regs-only so this is a moot point. Closing.

pprindeville commented 3 years ago

Still true that CEIL_NEG() is incorrect, however.