]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
staging: ccree: drop open coded init for memset
authorGilad Ben-Yossef <gilad@benyossef.com>
Sun, 7 May 2017 13:35:57 +0000 (16:35 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 May 2017 05:41:59 +0000 (07:41 +0200)
Replace open coded struct zeroing with a memset call.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ccree/cc_hw_queue_defs.h

index 8c2b7f48937345f2e193b77041aefc9b73f51590..f17c37db62586df70cfe070888dc1b065956e7a4 100644 (file)
@@ -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.