All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Trent Piepho <tpiepho@gmail.com>,
	Colin Ian King <colin.king@canonical.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Brendan Higgins <brendanhiggins@google.com>,
	linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] math: Make RATIONAL tristate
Date: Tue, 6 Jul 2021 13:31:59 +0300	[thread overview]
Message-ID: <YOQxH7mnEPEm4pFA@smile.fi.intel.com> (raw)
In-Reply-To: <20210706100945.3803694-2-geert@linux-m68k.org>

On Tue, Jul 06, 2021 at 12:09:44PM +0200, Geert Uytterhoeven wrote:
> 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.

Works for me,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> ---
> Exposed by commit b6c75c4afceb8bc0 ("lib/math/rational: add Kunit test
> cases") and CONFIG_KUNIT_ALL_TESTS=m.
> 
> v2:
>   - Drop compile-testing and help text.
> ---
>  lib/math/Kconfig    | 2 +-
>  lib/math/rational.c | 3 +++
>  2 files changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/math/Kconfig b/lib/math/Kconfig
> index f19bc9734fa7cc4b..0634b428d0cb7f86 100644
> --- a/lib/math/Kconfig
> +++ b/lib/math/Kconfig
> @@ -14,4 +14,4 @@ config PRIME_NUMBERS
>  	  If unsure, say N.
>  
>  config RATIONAL
> -	bool
> +	tristate
> diff --git a/lib/math/rational.c b/lib/math/rational.c
> index c0ab51d8fbb98d17..ec59d426ea638b0f 100644
> --- a/lib/math/rational.c
> +++ b/lib/math/rational.c
> @@ -13,6 +13,7 @@
>  #include <linux/export.h>
>  #include <linux/minmax.h>
>  #include <linux/limits.h>
> +#include <linux/module.h>
>  
>  /*
>   * calculate best rational approximation for a given fraction
> @@ -106,3 +107,5 @@ void rational_best_approximation(
>  }
>  
>  EXPORT_SYMBOL(rational_best_approximation);
> +
> +MODULE_LICENSE("GPL v2");
> -- 
> 2.25.1
> 

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2021-07-06 10:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-06 10:09 [PATCH 0/2] math: RATIONAL and RATIONAL_KUNIT_TEST improvements Geert Uytterhoeven
2021-07-06 10:09 ` [PATCH 1/2] math: Make RATIONAL tristate Geert Uytterhoeven
2021-07-06 10:31   ` Andy Shevchenko [this message]
2021-07-06 10:09 ` [PATCH 2/2] math: RATIONAL_KUNIT_TEST should depend on RATIONAL instead of selecting it Geert Uytterhoeven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YOQxH7mnEPEm4pFA@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=brendanhiggins@google.com \
    --cc=colin.king@canonical.com \
    --cc=geert@linux-m68k.org \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=tpiepho@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.