lkml.org 
[lkml]   [2021]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] lib/math/rational.c: Fix divide by zero
From
Date
On 5/24/21 9:55 AM, Daniel Latypov wrote:
> diff --git a/lib/math/Kconfig b/lib/math/Kconfig
> index f19bc9734fa7..20460b567493 100644
> --- a/lib/math/Kconfig
> +++ b/lib/math/Kconfig
> @@ -15,3 +15,14 @@ config PRIME_NUMBERS
>
> config RATIONAL
> bool
> +
> +config RATIONAL_KUNIT_TEST
> + tristate "KUnit test for rational number support" if !KUNIT_ALL_TESTS
> + # depends on KUNIT && RATIONAL # this is how it should work, but
> + depends on KUNIT
> + select RATIONAL # I don't grok kconfig enough to know why this

Only to set the symbol CONFIG_RATIONAL.
Then when 'make' descends into the lib/math/ subdir and looks at its Makefile,
it will decide to build the binary rational.o.

obj-$(CONFIG_RATIONAL) += rational.o


> is necessary
> + default KUNIT_ALL_TESTS
> + help
> + This builds unit tests for the rational number support.
> +
> + If unsure, say N.


--
~Randy

\
 
 \ /
  Last update: 2021-05-25 00:05    [W:0.084 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site