Andy Shevchenko
f97fa3dcb2
lib/math: Move dvb_math.c into lib/math/int_log.c
...
Some existing and new users may benefit from the intlog2() and
intlog10() APIs, make them wide available.
Reviewed-by: Mauro Carvalho Chehab <[email protected] >
Acked-by: Mauro Carvalho Chehab <[email protected] >
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Andy Shevchenko <[email protected] >
Reviewed-by: Randy Dunlap <[email protected] >
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected] >
2023-07-09 22:47:48 +01:00
Trent Piepho
b6c75c4afc
lib/math/rational: add Kunit test cases
...
Adds a number of test cases that cover a range of possible code paths.
[[email protected] : remove non-ascii characters, fix whitespace]
[[email protected] : fix spelling mistake "demominator" -> "denominator"]
Link: https://lkml.kernel.org/r/[email protected]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Trent Piepho <[email protected] >
Signed-off-by: Colin Ian King <[email protected] >
Reviewed-by: Andy Shevchenko <[email protected] >
Cc: Daniel Latypov <[email protected] >
Cc: Oskar Schirmer <[email protected] >
Cc: Yiyuan Guo <[email protected] >
Signed-off-by: Andrew Morton <[email protected] >
Signed-off-by: Linus Torvalds <[email protected] >
2021-07-01 11:06:05 -07:00
Maciej W. Rozycki
5086ea4b0f
lib/math: Add a `do_div' test module
...
Implement a module for correctness and performance evaluation for the
`do_div' function, often handled in an optimised manner by platform
code. Use a somewhat randomly generated set of inputs that is supposed
to be representative, using the same set of divisors twice, expressed as
a constant and as a variable each, so as to verify the implementation
for both cases should they be handled by different code execution paths.
Reference results were produced with GNU bc.
At the conclusion output the total execution time elapsed.
Signed-off-by: Maciej W. Rozycki <[email protected] >
Signed-off-by: Thomas Bogendoerfer <[email protected] >
2021-04-21 13:45:36 +02:00
Thomas Gleixner
ec8f24b7fa
treewide: Add SPDX license identifier - Makefile/Kconfig
...
Add SPDX license identifiers to all Make/Kconfig files which:
- Have no license information of any form
These files fall under the project license, GPL v2 only. The resulting SPDX
license identifier is:
GPL-2.0-only
Signed-off-by: Thomas Gleixner <[email protected] >
Signed-off-by: Greg Kroah-Hartman <[email protected] >
2019-05-21 10:50:46 +02:00
Andy Shevchenko
9f61589469
lib/math: move int_pow() from pwm_bl.c for wider use
...
The integer exponentiation is used in few places and might be used in
the future by other call sites. Move it to wider use.
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Andy Shevchenko <[email protected] >
Cc: Daniel Thompson <[email protected] >
Cc: Lee Jones <[email protected] >
Cc: Ray Jui <[email protected] >
Cc: Thierry Reding <[email protected] >
Signed-off-by: Andrew Morton <[email protected] >
Signed-off-by: Linus Torvalds <[email protected] >
2019-05-14 19:52:49 -07:00
Andy Shevchenko
2c64e9cb0b
lib: Move mathematic helpers to separate folder
...
For better maintenance and expansion move the mathematic helpers to the
separate folder.
No functional change intended.
Note, the int_sqrt() is not used as a part of lib, so, moved to regular
obj.
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Andy Shevchenko <[email protected] >
Signed-off-by: Mauro Carvalho Chehab <[email protected] >
Cc: Randy Dunlap <[email protected] >
Cc: Thierry Reding <[email protected] >
Cc: Lee Jones <[email protected] >
Cc: Daniel Thompson <[email protected] >
Cc: Ray Jui <[email protected] >
[[email protected] : fix broken doc references for div64.c and gcd.c]
Link: http://lkml.kernel.org/r/734f49bae5d4052b3c25691dfefad59bea2e5843.1555580999.git.mchehab+samsung@kernel.org
Signed-off-by: Andrew Morton <[email protected] >
Signed-off-by: Linus Torvalds <[email protected] >
2019-05-14 19:52:49 -07:00