@@ -271,8 +271,8 @@ qed_dcbx_process_tlv(struct qed_hwfn *p_hwfn,
271
271
struct dcbx_app_priority_entry * p_tbl ,
272
272
u32 pri_tc_tbl , int count , u8 dcbx_version )
273
273
{
274
- u8 tc , priority_map ;
275
274
enum dcbx_protocol_type type ;
275
+ u8 tc , priority_map ;
276
276
bool enable , ieee ;
277
277
u16 protocol_id ;
278
278
int priority ;
@@ -620,8 +620,7 @@ qed_dcbx_get_common_params(struct qed_hwfn *p_hwfn,
620
620
}
621
621
622
622
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 )
625
624
{
626
625
struct dcbx_features * p_feat ;
627
626
@@ -633,8 +632,7 @@ qed_dcbx_get_local_params(struct qed_hwfn *p_hwfn,
633
632
}
634
633
635
634
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 )
638
636
{
639
637
struct dcbx_features * p_feat ;
640
638
@@ -647,7 +645,6 @@ qed_dcbx_get_remote_params(struct qed_hwfn *p_hwfn,
647
645
648
646
static void
649
647
qed_dcbx_get_operational_params (struct qed_hwfn * p_hwfn ,
650
- struct qed_ptt * p_ptt ,
651
648
struct qed_dcbx_get * params )
652
649
{
653
650
struct qed_dcbx_operational_params * p_operational ;
@@ -697,7 +694,6 @@ qed_dcbx_get_operational_params(struct qed_hwfn *p_hwfn,
697
694
698
695
static void
699
696
qed_dcbx_get_local_lldp_params (struct qed_hwfn * p_hwfn ,
700
- struct qed_ptt * p_ptt ,
701
697
struct qed_dcbx_get * params )
702
698
{
703
699
struct lldp_config_params_s * p_local ;
@@ -712,7 +708,6 @@ qed_dcbx_get_local_lldp_params(struct qed_hwfn *p_hwfn,
712
708
713
709
static void
714
710
qed_dcbx_get_remote_lldp_params (struct qed_hwfn * p_hwfn ,
715
- struct qed_ptt * p_ptt ,
716
711
struct qed_dcbx_get * params )
717
712
{
718
713
struct lldp_status_params_s * p_remote ;
@@ -726,25 +721,24 @@ qed_dcbx_get_remote_lldp_params(struct qed_hwfn *p_hwfn,
726
721
}
727
722
728
723
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 ,
731
725
enum qed_mib_read_type type )
732
726
{
733
727
switch (type ) {
734
728
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 );
736
730
break ;
737
731
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 );
739
733
break ;
740
734
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 );
742
736
break ;
743
737
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 );
745
739
break ;
746
740
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 );
748
742
break ;
749
743
default :
750
744
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,
902
896
qed_sp_pf_update (p_hwfn );
903
897
}
904
898
}
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 );
906
901
qed_dcbx_aen (p_hwfn , type );
907
902
908
903
return rc ;
909
904
}
910
905
911
906
int qed_dcbx_info_alloc (struct qed_hwfn * p_hwfn )
912
907
{
913
- int rc = 0 ;
914
-
915
908
p_hwfn -> p_dcbx_info = kzalloc (sizeof (* p_hwfn -> p_dcbx_info ), GFP_KERNEL );
916
909
if (!p_hwfn -> p_dcbx_info )
917
- rc = - ENOMEM ;
910
+ return - ENOMEM ;
918
911
919
- return rc ;
912
+ return 0 ;
920
913
}
921
914
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 )
924
916
{
925
917
kfree (p_hwfn -> p_dcbx_info );
926
918
}
@@ -992,7 +984,7 @@ static int qed_dcbx_query_params(struct qed_hwfn *p_hwfn,
992
984
if (rc )
993
985
goto out ;
994
986
995
- rc = qed_dcbx_get_params (p_hwfn , p_ptt , p_get , type );
987
+ rc = qed_dcbx_get_params (p_hwfn , p_get , type );
996
988
997
989
out :
998
990
qed_ptt_release (p_hwfn , p_ptt );
0 commit comments