linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] crypto: caam - move shared symbols in a common location
@ 2019-07-18 14:49 Iuliana Prodan
  2019-07-19 16:54 ` Horia Geanta
  0 siblings, 1 reply; 2+ messages in thread
From: Iuliana Prodan @ 2019-07-18 14:49 UTC (permalink / raw)
  To: Herbert Xu, Horia Geanta, Aymen Sghaier
  Cc: David S. Miller, linux-crypto, linux-kernel, linux-imx

Moved to a common location the symbols shared by all CAAM drivers (jr,
qi, qi2).

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
---
This patch depends on series:
https://patchwork.kernel.org/project/linux-crypto/list/?series=147479

 drivers/crypto/caam/common_if.c | 7 +++++++
 drivers/crypto/caam/common_if.h | 7 +++++++
 drivers/crypto/caam/error.c     | 6 ------
 drivers/crypto/caam/error.h     | 5 -----
 4 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/drivers/crypto/caam/common_if.c b/drivers/crypto/caam/common_if.c
index 1291d3d..071b08d 100644
--- a/drivers/crypto/caam/common_if.c
+++ b/drivers/crypto/caam/common_if.c
@@ -7,6 +7,13 @@
 
 #include "compat.h"
 #include "common_if.h"
+#include <linux/types.h>
+
+bool caam_little_end;
+EXPORT_SYMBOL(caam_little_end);
+
+bool caam_imx;
+EXPORT_SYMBOL(caam_imx);
 
 /*
  * validate key length for AES algorithms
diff --git a/drivers/crypto/caam/common_if.h b/drivers/crypto/caam/common_if.h
index 61d5516..5fb8840 100644
--- a/drivers/crypto/caam/common_if.h
+++ b/drivers/crypto/caam/common_if.h
@@ -8,6 +8,8 @@
 #ifndef CAAM_COMMON_LOCATION_H
 #define CAAM_COMMON_LOCATION_H
 
+#include "desc.h"
+
 int check_aes_keylen(unsigned int keylen);
 
 int check_gcm_authsize(unsigned int authsize);
@@ -16,4 +18,9 @@ int check_rfc4106_authsize(unsigned int authsize);
 
 int check_ipsec_assoclen(unsigned int assoclen);
 
+static inline bool is_mdha(u32 algtype)
+{
+	return (algtype & OP_ALG_ALGSEL_MASK & ~OP_ALG_ALGSEL_SUBMASK) ==
+	       OP_ALG_CHA_MDHA;
+}
 #endif /* CAAM_COMMON_LOCATION_H */
diff --git a/drivers/crypto/caam/error.c b/drivers/crypto/caam/error.c
index b7fbf1b..b901872 100644
--- a/drivers/crypto/caam/error.c
+++ b/drivers/crypto/caam/error.c
@@ -50,12 +50,6 @@ void caam_dump_sg(const char *prefix_str, int prefix_type,
 #endif /* DEBUG */
 EXPORT_SYMBOL(caam_dump_sg);
 
-bool caam_little_end;
-EXPORT_SYMBOL(caam_little_end);
-
-bool caam_imx;
-EXPORT_SYMBOL(caam_imx);
-
 static const struct {
 	u8 value;
 	const char *error_text;
diff --git a/drivers/crypto/caam/error.h b/drivers/crypto/caam/error.h
index 16809fa..e2f6ed8 100644
--- a/drivers/crypto/caam/error.h
+++ b/drivers/crypto/caam/error.h
@@ -21,9 +21,4 @@ void caam_dump_sg(const char *prefix_str, int prefix_type,
 		  int rowsize, int groupsize, struct scatterlist *sg,
 		  size_t tlen, bool ascii);
 
-static inline bool is_mdha(u32 algtype)
-{
-	return (algtype & OP_ALG_ALGSEL_MASK & ~OP_ALG_ALGSEL_SUBMASK) ==
-	       OP_ALG_CHA_MDHA;
-}
 #endif /* CAAM_ERROR_H */
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-19 16:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-18 14:49 [PATCH] crypto: caam - move shared symbols in a common location Iuliana Prodan
2019-07-19 16:54 ` Horia Geanta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).