Commit 1f0ca208 authored by Rasmus Villemoes's avatar Rasmus Villemoes Committed by David S. Miller

net: qlcnic: delete redundant memsets

In all cases, mbx->req.arg and mbx->rsp.arg have just been allocated
using kcalloc(), so these six memsets are redundant.
Signed-off-by: default avatarRasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b66a6085
...@@ -918,8 +918,6 @@ int qlcnic_83xx_alloc_mbx_args(struct qlcnic_cmd_args *mbx, ...@@ -918,8 +918,6 @@ int qlcnic_83xx_alloc_mbx_args(struct qlcnic_cmd_args *mbx,
mbx->req.arg = NULL; mbx->req.arg = NULL;
return -ENOMEM; return -ENOMEM;
} }
memset(mbx->req.arg, 0, sizeof(u32) * mbx->req.num);
memset(mbx->rsp.arg, 0, sizeof(u32) * mbx->rsp.num);
temp = adapter->ahw->fw_hal_version << 29; temp = adapter->ahw->fw_hal_version << 29;
mbx->req.arg[0] = (type | (mbx->req.num << 16) | temp); mbx->req.arg[0] = (type | (mbx->req.num << 16) | temp);
mbx->cmd_op = type; mbx->cmd_op = type;
......
...@@ -73,8 +73,6 @@ int qlcnic_82xx_alloc_mbx_args(struct qlcnic_cmd_args *mbx, ...@@ -73,8 +73,6 @@ int qlcnic_82xx_alloc_mbx_args(struct qlcnic_cmd_args *mbx,
mbx->req.arg = NULL; mbx->req.arg = NULL;
return -ENOMEM; return -ENOMEM;
} }
memset(mbx->req.arg, 0, sizeof(u32) * mbx->req.num);
memset(mbx->rsp.arg, 0, sizeof(u32) * mbx->rsp.num);
mbx->req.arg[0] = type; mbx->req.arg[0] = type;
break; break;
} }
......
...@@ -729,8 +729,6 @@ static int qlcnic_sriov_alloc_bc_mbx_args(struct qlcnic_cmd_args *mbx, u32 type) ...@@ -729,8 +729,6 @@ static int qlcnic_sriov_alloc_bc_mbx_args(struct qlcnic_cmd_args *mbx, u32 type)
mbx->req.arg = NULL; mbx->req.arg = NULL;
return -ENOMEM; return -ENOMEM;
} }
memset(mbx->req.arg, 0, sizeof(u32) * mbx->req.num);
memset(mbx->rsp.arg, 0, sizeof(u32) * mbx->rsp.num);
mbx->req.arg[0] = (type | (mbx->req.num << 16) | mbx->req.arg[0] = (type | (mbx->req.num << 16) |
(3 << 29)); (3 << 29));
mbx->rsp.arg[0] = (type & 0xffff) | mbx->rsp.num << 16; mbx->rsp.arg[0] = (type & 0xffff) | mbx->rsp.num << 16;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment