Commit bcda5fd3 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Linus Torvalds

math: make RATIONAL tristate

Patch series "math: RATIONAL and RATIONAL_KUNIT_TEST improvements".

This series makes the RATIONAL symbol tristate, so it is not forced
builtin if all users are modular, and makes the RATIONAL_KUNIT_TEST depend
on RATIONAL, to avoid enabling RATIONAL if there are no real users.

This patch (of 2):

All but one symbols that select RATIONAL are tristate, but RATIONAL itself
is bool.  Change it to tristate, so the rational fractions support code
can be modular if no builtin code relies on it.

Link: https://lkml.kernel.org/r/20210706100945.3803694-1-geert@linux-m68k.org
Link: https://lkml.kernel.org/r/20210706100945.3803694-2-geert@linux-m68k.orgSigned-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Trent Piepho <tpiepho@gmail.com>
Cc: Colin Ian King <colin.king@canonical.com>
Cc: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 1c3493bb
...@@ -14,4 +14,4 @@ config PRIME_NUMBERS ...@@ -14,4 +14,4 @@ config PRIME_NUMBERS
If unsure, say N. If unsure, say N.
config RATIONAL config RATIONAL
bool tristate
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include <linux/export.h> #include <linux/export.h>
#include <linux/minmax.h> #include <linux/minmax.h>
#include <linux/limits.h> #include <linux/limits.h>
#include <linux/module.h>
/* /*
* calculate best rational approximation for a given fraction * calculate best rational approximation for a given fraction
...@@ -106,3 +107,5 @@ void rational_best_approximation( ...@@ -106,3 +107,5 @@ void rational_best_approximation(
} }
EXPORT_SYMBOL(rational_best_approximation); EXPORT_SYMBOL(rational_best_approximation);
MODULE_LICENSE("GPL v2");
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment