aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/qlogic/qed/qed_cxt.c
diff options
context:
space:
mode:
authorAlexander Lobakin <alobakin@marvell.com>2020-07-06 18:38:18 +0300
committerDavid S. Miller <davem@davemloft.net>2020-07-06 13:18:55 -0700
commita0f3266f4bf966eefd02123d3aacdf7df8d67c1c (patch)
treee3fd278c4ad1f60f8557bf753db5f5a2182872c0 /drivers/net/ethernet/qlogic/qed/qed_cxt.c
parentnet: qed: improve indentation of some parts of code (diff)
downloadlinux-dev-a0f3266f4bf966eefd02123d3aacdf7df8d67c1c.tar.xz
linux-dev-a0f3266f4bf966eefd02123d3aacdf7df8d67c1c.zip
net: qed: use ptr shortcuts to dedup field accessing in some parts
Use intermediate pointers instead of multiple dereferencing to simplify and beautify parts of code that will be addressed in the next commit. Signed-off-by: Alexander Lobakin <alobakin@marvell.com> Signed-off-by: Igor Russkikh <irusskikh@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qed/qed_cxt.c')
-rw-r--r--drivers/net/ethernet/qlogic/qed/qed_cxt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed_cxt.c b/drivers/net/ethernet/qlogic/qed/qed_cxt.c
index e3fe982532d5..3a62358b9749 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_cxt.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_cxt.c
@@ -2170,6 +2170,7 @@ qed_cxt_dynamic_ilt_alloc(struct qed_hwfn *p_hwfn,
enum qed_cxt_elem_type elem_type, u32 iid)
{
u32 reg_offset, shadow_line, elem_size, hw_p_size, elems_per_p, line;
+ struct tdif_task_context *tdif_context;
struct qed_ilt_client_cfg *p_cli;
struct qed_ilt_cli_blk *p_blk;
struct qed_ptt *p_ptt;
@@ -2252,7 +2253,9 @@ qed_cxt_dynamic_ilt_alloc(struct qed_hwfn *p_hwfn,
for (elem_i = 0; elem_i < elems_per_p; elem_i++) {
elem = (union type1_task_context *)elem_start;
- SET_FIELD(elem->roce_ctx.tdif_context.flags1,
+ tdif_context = &elem->roce_ctx.tdif_context;
+
+ SET_FIELD(tdif_context->flags1,
TDIF_TASK_CONTEXT_REF_TAG_MASK, 0xf);
elem_start += TYPE1_TASK_CXT_SIZE(p_hwfn);
}