aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/qlogic/qed/qed_init_ops.c
diff options
context:
space:
mode:
authorYuval Mintz <Yuval.Mintz@qlogic.com>2016-08-15 10:42:44 +0300
committerDavid S. Miller <davem@davemloft.net>2016-08-15 13:34:52 -0700
commit83aeb9339f4859c587d0ad3d80d225b520db047e (patch)
tree2acefd75b1650ce0e74fa4c5a77080a61364829e /drivers/net/ethernet/qlogic/qed/qed_init_ops.c
parentqed*: Semantic changes (diff)
downloadlinux-dev-83aeb9339f4859c587d0ad3d80d225b520db047e.tar.xz
linux-dev-83aeb9339f4859c587d0ad3d80d225b520db047e.zip
qed*: Trivial modifications
Change qed* code in trivial manner; This isn't necessarily semantic-only, but the end result is the same, i.e., no change should occur from user perspective. Changes include: - Using temporary variables to better fit 80-character restrictions. - Removal of unused variables & code with no effect. [plus some additional minor modifications]. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qed/qed_init_ops.c')
-rw-r--r--drivers/net/ethernet/qlogic/qed/qed_init_ops.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed_init_ops.c b/drivers/net/ethernet/qlogic/qed/qed_init_ops.c
index 57044eeeef24..b7a4b27ebdbd 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_init_ops.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_init_ops.c
@@ -295,17 +295,15 @@ static int qed_init_cmd_wr(struct qed_hwfn *p_hwfn,
switch (GET_FIELD(data, INIT_WRITE_OP_SOURCE)) {
case INIT_SRC_INLINE:
- qed_wr(p_hwfn, p_ptt, addr,
- le32_to_cpu(arg->inline_val));
+ data = le32_to_cpu(p_cmd->args.inline_val);
+ qed_wr(p_hwfn, p_ptt, addr, data);
break;
case INIT_SRC_ZEROS:
- if (b_must_dmae ||
- (b_can_dmae && (le32_to_cpu(arg->zeros_count) >= 64)))
- rc = qed_init_fill_dmae(p_hwfn, p_ptt, addr, 0,
- le32_to_cpu(arg->zeros_count));
+ data = le32_to_cpu(p_cmd->args.zeros_count);
+ if (b_must_dmae || (b_can_dmae && (data >= 64)))
+ rc = qed_init_fill_dmae(p_hwfn, p_ptt, addr, 0, data);
else
- qed_init_fill(p_hwfn, p_ptt, addr, 0,
- le32_to_cpu(arg->zeros_count));
+ qed_init_fill(p_hwfn, p_ptt, addr, 0, data);
break;
case INIT_SRC_ARRAY:
rc = qed_init_cmd_array(p_hwfn, p_ptt, p_cmd,