]> git.baikalelectronics.ru Git - kernel.git/commitdiff
qed: remove unnecessary memset in qed_init_fw_funcs
authorWan Jiabing <wanjiabing@vivo.com>
Fri, 18 Mar 2022 09:31:53 +0000 (17:31 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 Mar 2022 10:59:56 +0000 (10:59 +0000)
allocated_mem is allocated by kcalloc(). The memory is set to zero.
It is unnecessary to call memset again.

Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c

index 0ce37f2460a41ff00e1dd0f18f8d0f702acce285..407029a36fa14f88f3a9475f0be464d0c03a5eda 100644 (file)
@@ -1835,8 +1835,6 @@ struct phys_mem_desc *qed_fw_overlay_mem_alloc(struct qed_hwfn *p_hwfn,
        if (!allocated_mem)
                return NULL;
 
-       memset(allocated_mem, 0, NUM_STORMS * sizeof(struct phys_mem_desc));
-
        /* For each Storm, set physical address in RAM */
        while (buf_offset < buf_size) {
                struct phys_mem_desc *storm_mem_desc;