[PATCH 04/10] staging: ccree: drop open coded init for memset
Gilad Ben-Yossef
gilad at benyossef.com
Sun May 7 13:35:57 UTC 2017
Replace open coded struct zeroing with a memset call.
Signed-off-by: Gilad Ben-Yossef <gilad at benyossef.com>
---
drivers/staging/ccree/cc_hw_queue_defs.h | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/staging/ccree/cc_hw_queue_defs.h b/drivers/staging/ccree/cc_hw_queue_defs.h
index 8c2b7f4..f17c37d 100644
--- a/drivers/staging/ccree/cc_hw_queue_defs.h
+++ b/drivers/staging/ccree/cc_hw_queue_defs.h
@@ -172,14 +172,7 @@ typedef enum HwDesKeySize {
#define GET_HW_Q_DESC_WORD_IDX(descWordIdx) (CC_REG_OFFSET(CRY_KERNEL, DSCRPTR_QUEUE_WORD ## descWordIdx) )
-#define HW_DESC_INIT(pDesc) do { \
- (pDesc)->word[0] = 0; \
- (pDesc)->word[1] = 0; \
- (pDesc)->word[2] = 0; \
- (pDesc)->word[3] = 0; \
- (pDesc)->word[4] = 0; \
- (pDesc)->word[5] = 0; \
-} while (0)
+#define HW_DESC_INIT(pDesc) memset(pDesc, 0, sizeof(HwDesc_s))
/*!
* This macro indicates the end of current HW descriptors flow and release the HW engines.
--
2.1.4
More information about the devel
mailing list