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: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
b66a60857c
commit
1f0ca20853
3 changed files with 0 additions and 6 deletions
|
@ -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,
|
||||||
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)
|
||||||
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;
|
||||||
|
|
Loading…
Reference in a new issue