From nobody Thu Apr 9 12:06:25 2026 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E073533AD95 for ; Fri, 27 Feb 2026 07:50:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.21 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772178606; cv=none; b=lU9IHI9pqQ3w2mbdXyZzydsgCot1VS6dGGFI+nYeLeoVr9VK/hYazy3+hB5CUMF/N0BYgckS7BU+QG/ETBi1RjHtS3dKrI0xXiMAa27B32KwXnbWd6txvf+wJLKPSxWJ82X1drBG8FPPYLEJkaD5HNpJczrkT8TCU36dZiIcE68= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772178606; c=relaxed/simple; bh=KB+6+f44haTDHYLGeCGUteENEk5HBUea0MN1HmDVvQE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jidIsVSVlTnofHQrlTBzb+qJ7GpJnUmSy3L66sce/9zXzhkOjqKq6dUe88Mva3cBa+wJwxG3XmZofgTlbuNhciafhK6YJGopGOhyyusmsxSzUr+0koxmf6uSxWdEJdv+bBWBjh7TG8ABeyrx7RM6p+kNSNrt3cp1HNP8noZRtso= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=LUJll5Yc; arc=none smtp.client-ip=198.175.65.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="LUJll5Yc" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1772178605; x=1803714605; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=KB+6+f44haTDHYLGeCGUteENEk5HBUea0MN1HmDVvQE=; b=LUJll5YcNrbeKLJzgx4AmoLLfOUxuf7DJG0pr8NA5SLv5EJfVw2fSLkD pJ4EyNt+7SasOYtfKbiQBsAXpYTh5mnzhk47QV+X9/MYp5KGZEeZ527Uy kLplg/TX+/ZL2ZNBhpjhu0WoYzqVWeNmCLi7oo7ib/HuTjddr987fRF8n wgtsZ4gNuy+VNrvHQq7AIC+5YcRzkZj0KKoGfZJ0iYJZRFORR+e7RzTQB i4rX/3zvMCY6rQKKj7U4JeLS/967EmL5k1Nja8fjz1kjCPYnRRQPbHAa8 qXvBHhm2b7MnAIg09sGp2oCBpDmy9WgzoLZdGxsVpM4idUioFF+KdRRPV Q==; X-CSE-ConnectionGUID: M7efyPAMRNaTICp4ORHQpQ== X-CSE-MsgGUID: PNJAqHP6TDWrs+0UktHz4w== X-IronPort-AV: E=McAfee;i="6800,10657,11713"; a="73128615" X-IronPort-AV: E=Sophos;i="6.21,313,1763452800"; d="scan'208";a="73128615" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Feb 2026 23:50:03 -0800 X-CSE-ConnectionGUID: IwNFPl/zS82GUqUN71xj4g== X-CSE-MsgGUID: ux//3dk6RgKC6gN23Zon3A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,313,1763452800"; d="scan'208";a="254608165" Received: from black.igk.intel.com ([10.91.253.5]) by orviesa001.jf.intel.com with ESMTP; 26 Feb 2026 23:50:01 -0800 Received: by black.igk.intel.com (Postfix, from userid 1003) id 53C4899; Fri, 27 Feb 2026 08:50:00 +0100 (CET) From: Andy Shevchenko To: linux-kernel@vger.kernel.org Cc: Andrew Morton , Randy Dunlap , Andy Shevchenko Subject: [PATCH v1 1/3] lib: polynomial: Move to math/ subfolder Date: Fri, 27 Feb 2026 08:47:58 +0100 Message-ID: <20260227074957.1144321-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260227074957.1144321-1-andriy.shevchenko@linux.intel.com> References: <20260227074957.1144321-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Signed-off-by: Andy Shevchenko Reviewed-by: Kuan-Wei Chiu --- lib/Kconfig | 3 --- lib/Makefile | 2 -- lib/math/Kconfig | 3 +++ lib/math/Makefile | 1 + lib/{ =3D> math}/polynomial.c | 0 5 files changed, 4 insertions(+), 5 deletions(-) rename lib/{ =3D> math}/polynomial.c (100%) diff --git a/lib/Kconfig b/lib/Kconfig index 0b8241e5b548..d6a5c699a919 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -637,9 +637,6 @@ config PLDMFW config ASN1_ENCODER tristate =20 -config POLYNOMIAL - tristate - config FIRMWARE_TABLE bool =20 diff --git a/lib/Makefile b/lib/Makefile index abc32420b581..00668fda0203 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -244,8 +244,6 @@ obj-$(CONFIG_MEMREGION) +=3D memregion.o obj-$(CONFIG_STMP_DEVICE) +=3D stmp_device.o obj-$(CONFIG_IRQ_POLL) +=3D irq_poll.o =20 -obj-$(CONFIG_POLYNOMIAL) +=3D 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. =20 +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 +=3D div64.o gcd.o lcm.o int_log.o int_pow.o int_sqrt.o reciprocal_d= iv.o =20 obj-$(CONFIG_CORDIC) +=3D cordic.o +obj-$(CONFIG_POLYNOMIAL) +=3D polynomial.o obj-$(CONFIG_PRIME_NUMBERS) +=3D prime_numbers.o obj-$(CONFIG_RATIONAL) +=3D rational.o =20 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 --=20 2.50.1 From nobody Thu Apr 9 12:06:25 2026 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9401E36B054 for ; Fri, 27 Feb 2026 07:50:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.21 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772178607; cv=none; b=E/3rNxVh5Z1UYkx/6ucSIlYvgAGC39iZyAulOp12ILr/96hFsxydpW05f74OX7nyUsJ3rs4hddqfThKLebdsBSoMeAqRXJj10IlP+mkCJ1zBTBOtzKKc90LctAqiU8KWRZg++r6DZx06GOTAVLwxjlfiRzwNfd8fVKbjr3k/b+0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772178607; c=relaxed/simple; bh=5ObZLIOqEfhggn2PoBM+7+LPXBVXuyvRg0TRU0NGN5Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=p+9/k06ewW3qsJbwgti0+fuLbWgKQDDDe/ynx6li4Vkz+UwrGAEZBiRjEXgn66CKS3htSuS9ayBnNaFdj/E+53WmvT6skDWhdZjZT57UpnqYvgybao+fy8zJ0bP5pwq1hajlCbQBYm9B807+dU5CTU4nUCBU3Sjhk8YBtnUdcWw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=BNSBeZ/v; arc=none smtp.client-ip=198.175.65.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="BNSBeZ/v" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1772178607; x=1803714607; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=5ObZLIOqEfhggn2PoBM+7+LPXBVXuyvRg0TRU0NGN5Q=; b=BNSBeZ/vXUAbgfW8daJg7ik0r+Q7L5HtnXIchXvY3dPTFoDkLHBwqosv f0Lqo0trXoCbclmSDi2N240V8LaM4ONsa/0zMc46B4RNU6xTvVIXbxhZ/ cgFVC2zcxShxoDPhl74RFXywlRukZU/lHcuhq5nMU03dLyNpGNSkoK1OM /DZXr0aDvL2fxORLscMv7V1uZgvDRgtZG1dkiXJ5RxLVcf7WmofjRlSR+ 0dZ6ZPZ/OeL7fL14Y6WyjKZvZ3TPG6GbKZI4gff2dKUV0PiXghaMwbROj XEuRD2M5XsIQ6hphSJbP435VI4QuekcGRg5nsNAd3h7RSMcWP5uWwhrQv w==; X-CSE-ConnectionGUID: AwI5i7AWS7qNQs8vHs7lUg== X-CSE-MsgGUID: PsfVgU5nQRaSysR6gL5l7A== X-IronPort-AV: E=McAfee;i="6800,10657,11713"; a="73128618" X-IronPort-AV: E=Sophos;i="6.21,313,1763452800"; d="scan'208";a="73128618" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Feb 2026 23:50:03 -0800 X-CSE-ConnectionGUID: 5dpKLpJ8QcO9frngdtSgWw== X-CSE-MsgGUID: PMa//wyzQryYV+9/up+ocg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,313,1763452800"; d="scan'208";a="254608166" Received: from black.igk.intel.com ([10.91.253.5]) by orviesa001.jf.intel.com with ESMTP; 26 Feb 2026 23:50:01 -0800 Received: by black.igk.intel.com (Postfix, from userid 1003) id 57E819B; Fri, 27 Feb 2026 08:50:00 +0100 (CET) From: Andy Shevchenko To: linux-kernel@vger.kernel.org Cc: Andrew Morton , Randy Dunlap , Andy Shevchenko Subject: [PATCH v1 2/3] lib: math: polynomial: Don't use 'proxy' headers Date: Fri, 27 Feb 2026 08:47:59 +0100 Message-ID: <20260227074957.1144321-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260227074957.1144321-1-andriy.shevchenko@linux.intel.com> References: <20260227074957.1144321-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Update header inclusions to follow IWYU (Include What You Use) principle. Signed-off-by: Andy Shevchenko Reviewed-by: Kuan-Wei Chiu --- lib/math/polynomial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/math/polynomial.c b/lib/math/polynomial.c index 66d383445fec..805d1de56b9a 100644 --- a/lib/math/polynomial.c +++ b/lib/math/polynomial.c @@ -10,7 +10,7 @@ * */ =20 -#include +#include #include #include =20 --=20 2.50.1 From nobody Thu Apr 9 12:06:25 2026 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5AB8F364E91 for ; Fri, 27 Feb 2026 07:50:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.21 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772178607; cv=none; b=arfWxl/k85C3MGAVnLarrk4krRXVLmvvsbcvRnR6zLGZVwYTYP4Cgs2sPWglLP4uX3kYF4yeqM6NawER+RkfR5g0abqtbSKoNw0tnk2QWrP2Z8TrsOVUSYD4tJpq7ef8QXqqVFySZJE5hfGMr+3Y2Zo+evV9vIRYFHZuue0rNUo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772178607; c=relaxed/simple; bh=TaYqeY0nTy6r7VCUYmBF+mnkHlBH7NZXSkhullyWHBg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=b4U3Y2L/rgKO7U1ZHb4SIRmWllknYXbFy4JFCsgADQ3XPzNcKe5zVmnpJc67OYwDoo8kMvzLl1erFwhiCgLKqoapna55oWQExiW4OBm+3NwaqXWFPSTYIG1NdwwtI2jby/qgygrgL7gosEIm2Zw1SDidieRgIdeDTTbzOsUG73M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=W+BdyXtj; arc=none smtp.client-ip=198.175.65.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="W+BdyXtj" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1772178607; x=1803714607; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=TaYqeY0nTy6r7VCUYmBF+mnkHlBH7NZXSkhullyWHBg=; b=W+BdyXtjGvAUu/CWPuKhttfZ1AwKVbHVvdxyjkH4Z/k++6E3xPrkoevl TxKKGGBvzz9KX+rDcP7FHtlWddiBuwTqIX9N9+RhJKz67sD5rtvNvmOWr ARCY2DIlxLwOPmslOKudgV4YNxdk2APtAm0nSEWGil1AcAkotgWp21vte VtgsYuGNJ2c68/W57WXST/iMkM+OUgd9l2guVCNWTNeijS3UxBBc61htW mMQIB1aUgwuV/XfdUGh6mm1wfZ0AHW0rimvM9GAHGdLcYKZeMlTNLTy/2 mBV08kgz0553S0ZDfe0lneVd9SbbONRE6ohKIRn/Maxxr+ju20xJpz09+ g==; X-CSE-ConnectionGUID: kyUPRlonRx67NmFGY6sGCA== X-CSE-MsgGUID: 6AsJUjrhR6C1Bzi2kphz8Q== X-IronPort-AV: E=McAfee;i="6800,10657,11713"; a="73128621" X-IronPort-AV: E=Sophos;i="6.21,313,1763452800"; d="scan'208";a="73128621" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Feb 2026 23:50:03 -0800 X-CSE-ConnectionGUID: rUPknhQpTjG0ezc3qtsXRA== X-CSE-MsgGUID: KfLyxMAIS+qABiPxs6pyew== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,313,1763452800"; d="scan'208";a="254608167" Received: from black.igk.intel.com ([10.91.253.5]) by orviesa001.jf.intel.com with ESMTP; 26 Feb 2026 23:50:01 -0800 Received: by black.igk.intel.com (Postfix, from userid 1003) id 5BF7B9D; Fri, 27 Feb 2026 08:50:00 +0100 (CET) From: Andy Shevchenko To: linux-kernel@vger.kernel.org Cc: Andrew Morton , Randy Dunlap , Andy Shevchenko Subject: [PATCH v1 3/3] lib: math: polynomial: Remove link to non-exist file and fix spelling Date: Fri, 27 Feb 2026 08:48:00 +0100 Message-ID: <20260227074957.1144321-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260227074957.1144321-1-andriy.shevchenko@linux.intel.com> References: <20260227074957.1144321-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The Baikal SoC and platform support was dropped from the kernel, remove the reference to non-exist file. While at it, fix spelling. Signed-off-by: Andy Shevchenko Reviewed-by: Kuan-Wei Chiu Reviewed-by: Randy Dunlap --- lib/math/polynomial.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/lib/math/polynomial.c b/lib/math/polynomial.c index 805d1de56b9a..c1d113f7ca37 100644 --- a/lib/math/polynomial.c +++ b/lib/math/polynomial.c @@ -15,16 +15,13 @@ #include =20 /* - * Originally this was part of drivers/hwmon/bt1-pvt.c. * There the following conversion is used and should serve as an example h= ere: * * The original translation formulae of the temperature (in degrees of Cel= sius) * to PVT data and vice-versa are following: * - * N =3D 1.8322e-8*(T^4) + 2.343e-5*(T^3) + 8.7018e-3*(T^2) + 3.9269*(T^1)= + - * 1.7204e2 - * T =3D -1.6743e-11*(N^4) + 8.1542e-8*(N^3) + -1.8201e-4*(N^2) + - * 3.1020e-1*(N^1) - 4.838e1 + * N =3D 1.8322e-8*(T^4) + 2.343e-5*(T^3) + 8.7018e-3*(T^2) + 3.9269*(T^1)= + 1.7204e2 + * T =3D -1.6743e-11*(N^4) + 8.1542e-8*(N^3) + -1.8201e-4*(N^2) + 3.1020e-= 1*(N^1) - 4.838e1 * * where T =3D [-48.380, 147.438]C and N =3D [0, 1023]. * @@ -35,10 +32,9 @@ * formulae to accept millidegrees of Celsius. Here what they look like af= ter * the alterations: * - * N =3D (18322e-20*(T^4) + 2343e-13*(T^3) + 87018e-9*(T^2) + 39269e-3*T + - * 17204e2) / 1e4 - * T =3D -16743e-12*(D^4) + 81542e-9*(D^3) - 182010e-6*(D^2) + 310200e-3*D= - - * 48380 + * N =3D (18322e-20*(T^4) + 2343e-13*(T^3) + 87018e-9*(T^2) + 39269e-3*T += 17204e2) / 1e4 + * T =3D -16743e-12*(D^4) + 81542e-9*(D^3) - 182010e-6*(D^2) + 310200e-3*D= - 48380 + * * where T =3D [-48380, 147438] mC and N =3D [0, 1023]. * * static const struct polynomial poly_temp_to_N =3D { @@ -68,13 +64,13 @@ * polynomial_calc - calculate a polynomial using integer arithmetic * * @poly: pointer to the descriptor of the polynomial - * @data: input value of the polynimal + * @data: input value of the polynomial * * Calculate the result of a polynomial using only integer arithmetic. For * this to work without too much loss of precision the coefficients has to * be altered. This is called factor redistribution. * - * Returns the result of the polynomial calculation. + * Return: the result of the polynomial calculation. */ long polynomial_calc(const struct polynomial *poly, long data) { --=20 2.50.1