public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Randy Dunlap <rdunlap@infradead.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Kuan-Wei Chiu <visitorckw@gmail.com>
Subject: [PATCH v2 1/3] lib: polynomial: Move to math/ subfolder
Date: Mon,  2 Mar 2026 10:28:07 +0100	[thread overview]
Message-ID: <20260302092831.2267785-2-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20260302092831.2267785-1-andriy.shevchenko@linux.intel.com>

The algorithm behind polynomial belongs to our collection of
math equations and expressions handling. Move it to math/
subfolder where others of the kind are located.

Reviewed-by: Kuan-Wei Chiu <visitorckw@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 lib/Kconfig                 | 3 ---
 lib/Makefile                | 2 --
 lib/math/Kconfig            | 3 +++
 lib/math/Makefile           | 1 +
 lib/{ => math}/polynomial.c | 0
 5 files changed, 4 insertions(+), 5 deletions(-)
 rename lib/{ => math}/polynomial.c (100%)

diff --git a/lib/Kconfig b/lib/Kconfig
index 5be57adcd454..00a9509636c1 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -626,9 +626,6 @@ config PLDMFW
 config ASN1_ENCODER
        tristate
 
-config POLYNOMIAL
-       tristate
-
 config FIRMWARE_TABLE
 	bool
 
diff --git a/lib/Makefile b/lib/Makefile
index 84da412a044f..9ea149e618d2 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -243,8 +243,6 @@ obj-$(CONFIG_MEMREGION) += memregion.o
 obj-$(CONFIG_STMP_DEVICE) += stmp_device.o
 obj-$(CONFIG_IRQ_POLL) += irq_poll.o
 
-obj-$(CONFIG_POLYNOMIAL) += polynomial.o
-
 # stackdepot.c should not be instrumented or call instrumented functions.
 # Prevent the compiler from calling builtins like memcmp() or bcmp() from this
 # file.
diff --git a/lib/math/Kconfig b/lib/math/Kconfig
index 0634b428d0cb..0e6d9cffc5d6 100644
--- a/lib/math/Kconfig
+++ b/lib/math/Kconfig
@@ -5,6 +5,9 @@ config CORDIC
 	  This option provides an implementation of the CORDIC algorithm;
 	  calculations are in fixed point. Module will be called cordic.
 
+config POLYNOMIAL
+       tristate
+
 config PRIME_NUMBERS
 	tristate "Simple prime number generator for testing"
 	help
diff --git a/lib/math/Makefile b/lib/math/Makefile
index d1caba23baa0..9a3850d55b79 100644
--- a/lib/math/Makefile
+++ b/lib/math/Makefile
@@ -2,6 +2,7 @@
 obj-y += div64.o gcd.o lcm.o int_log.o int_pow.o int_sqrt.o reciprocal_div.o
 
 obj-$(CONFIG_CORDIC)		+= cordic.o
+obj-$(CONFIG_POLYNOMIAL)	+= polynomial.o
 obj-$(CONFIG_PRIME_NUMBERS)	+= prime_numbers.o
 obj-$(CONFIG_RATIONAL)		+= rational.o
 
diff --git a/lib/polynomial.c b/lib/math/polynomial.c
similarity index 100%
rename from lib/polynomial.c
rename to lib/math/polynomial.c
-- 
2.50.1


  reply	other threads:[~2026-03-02  9:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-02  9:28 [PATCH v2 0/3] lib: polynomial: Move to math/ and clean up Andy Shevchenko
2026-03-02  9:28 ` Andy Shevchenko [this message]
2026-03-02  9:28 ` [PATCH v2 2/3] lib: math: polynomial: Don't use 'proxy' headers Andy Shevchenko
2026-03-02  9:28 ` [PATCH v2 3/3] lib: math: polynomial: Remove link to non-exist file and fix spelling Andy Shevchenko

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=20260302092831.2267785-2-andriy.shevchenko@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=visitorckw@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox