[PATCH 1/3] crypto: octeontx2: Simplify bitmap declaration
From: Christophe JAILLET
Date: Sun Jul 10 2022 - 08:19:22 EST
'OTX2_CPT_ENGS_BITMASK_LEN' is only used to allocate a bitmap.
In order to simplify the code, remove OTX2_CPT_ENGS_BITMASK_LEN and use
DECLARE_BITMAP to declare the 'bits' bitmap.
Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
---
drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.h b/drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.h
index e69320a54b5d..7c503e44a286 100644
--- a/drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.h
+++ b/drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.h
@@ -26,8 +26,6 @@
/* Maximum number of supported engines/cores on OcteonTX2/CN10K platform */
#define OTX2_CPT_MAX_ENGINES 144
-#define OTX2_CPT_ENGS_BITMASK_LEN BITS_TO_LONGS(OTX2_CPT_MAX_ENGINES)
-
#define OTX2_CPT_UCODE_SZ (64 * 1024)
/* Microcode types */
@@ -48,7 +46,7 @@ enum otx2_cpt_ucode_type {
};
struct otx2_cpt_bitmap {
- unsigned long bits[OTX2_CPT_ENGS_BITMASK_LEN];
+ DECLARE_BITMAP(bits, OTX2_CPT_MAX_ENGINES);
int size;
};
--
2.34.1