Skip to content

Commit 270837b

Browse files
sudarsana.kalluru@cavium.comdavem330
authored andcommitted
qed: Cleanup DCBx unnecessary parameters.
Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com> Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 9b53816 commit 270837b

File tree

3 files changed

+17
-25
lines changed

3 files changed

+17
-25
lines changed

drivers/net/ethernet/qlogic/qed/qed_dcbx.c

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,8 @@ qed_dcbx_process_tlv(struct qed_hwfn *p_hwfn,
271271
struct dcbx_app_priority_entry *p_tbl,
272272
u32 pri_tc_tbl, int count, u8 dcbx_version)
273273
{
274-
u8 tc, priority_map;
275274
enum dcbx_protocol_type type;
275+
u8 tc, priority_map;
276276
bool enable, ieee;
277277
u16 protocol_id;
278278
int priority;
@@ -620,8 +620,7 @@ qed_dcbx_get_common_params(struct qed_hwfn *p_hwfn,
620620
}
621621

622622
static void
623-
qed_dcbx_get_local_params(struct qed_hwfn *p_hwfn,
624-
struct qed_ptt *p_ptt, struct qed_dcbx_get *params)
623+
qed_dcbx_get_local_params(struct qed_hwfn *p_hwfn, struct qed_dcbx_get *params)
625624
{
626625
struct dcbx_features *p_feat;
627626

@@ -633,8 +632,7 @@ qed_dcbx_get_local_params(struct qed_hwfn *p_hwfn,
633632
}
634633

635634
static void
636-
qed_dcbx_get_remote_params(struct qed_hwfn *p_hwfn,
637-
struct qed_ptt *p_ptt, struct qed_dcbx_get *params)
635+
qed_dcbx_get_remote_params(struct qed_hwfn *p_hwfn, struct qed_dcbx_get *params)
638636
{
639637
struct dcbx_features *p_feat;
640638

@@ -647,7 +645,6 @@ qed_dcbx_get_remote_params(struct qed_hwfn *p_hwfn,
647645

648646
static void
649647
qed_dcbx_get_operational_params(struct qed_hwfn *p_hwfn,
650-
struct qed_ptt *p_ptt,
651648
struct qed_dcbx_get *params)
652649
{
653650
struct qed_dcbx_operational_params *p_operational;
@@ -697,7 +694,6 @@ qed_dcbx_get_operational_params(struct qed_hwfn *p_hwfn,
697694

698695
static void
699696
qed_dcbx_get_local_lldp_params(struct qed_hwfn *p_hwfn,
700-
struct qed_ptt *p_ptt,
701697
struct qed_dcbx_get *params)
702698
{
703699
struct lldp_config_params_s *p_local;
@@ -712,7 +708,6 @@ qed_dcbx_get_local_lldp_params(struct qed_hwfn *p_hwfn,
712708

713709
static void
714710
qed_dcbx_get_remote_lldp_params(struct qed_hwfn *p_hwfn,
715-
struct qed_ptt *p_ptt,
716711
struct qed_dcbx_get *params)
717712
{
718713
struct lldp_status_params_s *p_remote;
@@ -726,25 +721,24 @@ qed_dcbx_get_remote_lldp_params(struct qed_hwfn *p_hwfn,
726721
}
727722

728723
static int
729-
qed_dcbx_get_params(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
730-
struct qed_dcbx_get *p_params,
724+
qed_dcbx_get_params(struct qed_hwfn *p_hwfn, struct qed_dcbx_get *p_params,
731725
enum qed_mib_read_type type)
732726
{
733727
switch (type) {
734728
case QED_DCBX_REMOTE_MIB:
735-
qed_dcbx_get_remote_params(p_hwfn, p_ptt, p_params);
729+
qed_dcbx_get_remote_params(p_hwfn, p_params);
736730
break;
737731
case QED_DCBX_LOCAL_MIB:
738-
qed_dcbx_get_local_params(p_hwfn, p_ptt, p_params);
732+
qed_dcbx_get_local_params(p_hwfn, p_params);
739733
break;
740734
case QED_DCBX_OPERATIONAL_MIB:
741-
qed_dcbx_get_operational_params(p_hwfn, p_ptt, p_params);
735+
qed_dcbx_get_operational_params(p_hwfn, p_params);
742736
break;
743737
case QED_DCBX_REMOTE_LLDP_MIB:
744-
qed_dcbx_get_remote_lldp_params(p_hwfn, p_ptt, p_params);
738+
qed_dcbx_get_remote_lldp_params(p_hwfn, p_params);
745739
break;
746740
case QED_DCBX_LOCAL_LLDP_MIB:
747-
qed_dcbx_get_local_lldp_params(p_hwfn, p_ptt, p_params);
741+
qed_dcbx_get_local_lldp_params(p_hwfn, p_params);
748742
break;
749743
default:
750744
DP_ERR(p_hwfn, "MIB read err, unknown mib type %d\n", type);
@@ -902,25 +896,23 @@ qed_dcbx_mib_update_event(struct qed_hwfn *p_hwfn,
902896
qed_sp_pf_update(p_hwfn);
903897
}
904898
}
905-
qed_dcbx_get_params(p_hwfn, p_ptt, &p_hwfn->p_dcbx_info->get, type);
899+
900+
qed_dcbx_get_params(p_hwfn, &p_hwfn->p_dcbx_info->get, type);
906901
qed_dcbx_aen(p_hwfn, type);
907902

908903
return rc;
909904
}
910905

911906
int qed_dcbx_info_alloc(struct qed_hwfn *p_hwfn)
912907
{
913-
int rc = 0;
914-
915908
p_hwfn->p_dcbx_info = kzalloc(sizeof(*p_hwfn->p_dcbx_info), GFP_KERNEL);
916909
if (!p_hwfn->p_dcbx_info)
917-
rc = -ENOMEM;
910+
return -ENOMEM;
918911

919-
return rc;
912+
return 0;
920913
}
921914

922-
void qed_dcbx_info_free(struct qed_hwfn *p_hwfn,
923-
struct qed_dcbx_info *p_dcbx_info)
915+
void qed_dcbx_info_free(struct qed_hwfn *p_hwfn)
924916
{
925917
kfree(p_hwfn->p_dcbx_info);
926918
}
@@ -992,7 +984,7 @@ static int qed_dcbx_query_params(struct qed_hwfn *p_hwfn,
992984
if (rc)
993985
goto out;
994986

995-
rc = qed_dcbx_get_params(p_hwfn, p_ptt, p_get, type);
987+
rc = qed_dcbx_get_params(p_hwfn, p_get, type);
996988

997989
out:
998990
qed_ptt_release(p_hwfn, p_ptt);

drivers/net/ethernet/qlogic/qed/qed_dcbx.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ qed_dcbx_mib_update_event(struct qed_hwfn *,
119119
struct qed_ptt *, enum qed_mib_read_type);
120120

121121
int qed_dcbx_info_alloc(struct qed_hwfn *p_hwfn);
122-
void qed_dcbx_info_free(struct qed_hwfn *, struct qed_dcbx_info *);
122+
void qed_dcbx_info_free(struct qed_hwfn *p_hwfn);
123123
void qed_dcbx_set_pf_update_params(struct qed_dcbx_results *p_src,
124124
struct pf_update_ramrod_data *p_dest);
125125

drivers/net/ethernet/qlogic/qed/qed_dev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ void qed_resc_free(struct qed_dev *cdev)
183183
}
184184
qed_iov_free(p_hwfn);
185185
qed_dmae_info_free(p_hwfn);
186-
qed_dcbx_info_free(p_hwfn, p_hwfn->p_dcbx_info);
186+
qed_dcbx_info_free(p_hwfn);
187187
}
188188
}
189189

0 commit comments

Comments
 (0)