diff mbox series

[RFC,v3,1/3] MPI: Export mpi_add_ui and mpi_mod for SM9

Message ID 20230625014958.32631-2-guozihua@huawei.com
State New
Headers show
Series crypto: Introduce SM9 key exchange | expand

Commit Message

Guozihua (Scott) June 25, 2023, 1:49 a.m. UTC
SM9 which could be built as a module would be using mpi_add_ui and mpi_mod.
So export them.

Signed-off-by: GUO Zihua <guozihua@huawei.com>
---
 lib/mpi/mpi-add.c | 2 +-
 lib/mpi/mpi-mod.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/lib/mpi/mpi-add.c b/lib/mpi/mpi-add.c
index 9056fc5167fc..d34c6c1c6fab 100644
--- a/lib/mpi/mpi-add.c
+++ b/lib/mpi/mpi-add.c
@@ -62,7 +62,7 @@  void mpi_add_ui(MPI w, MPI u, unsigned long v)
 	w->nlimbs = wsize;
 	w->sign   = wsign;
 }
-
+EXPORT_SYMBOL_GPL(mpi_add_ui);
 
 void mpi_add(MPI w, MPI u, MPI v)
 {
diff --git a/lib/mpi/mpi-mod.c b/lib/mpi/mpi-mod.c
index 54fcc01564d9..8136f4aff287 100644
--- a/lib/mpi/mpi-mod.c
+++ b/lib/mpi/mpi-mod.c
@@ -26,6 +26,7 @@  void mpi_mod(MPI rem, MPI dividend, MPI divisor)
 {
 	mpi_fdiv_r(rem, dividend, divisor);
 }
+EXPORT_SYMBOL_GPL(mpi_mod);
 
 /* This function returns a new context for Barrett based operations on
  * the modulus M.  This context needs to be released using