@@ -377,9 +377,8 @@ static void qed_cxt_set_proto_cid_count(struct qed_hwfn *p_hwfn,
377377 }
378378}
379379
380- u32 qed_cxt_get_proto_cid_count (struct qed_hwfn * p_hwfn ,
381- enum protocol_type type ,
382- u32 * vf_cid )
380+ u32 qed_cxt_get_proto_cid_count (struct qed_hwfn * p_hwfn ,
381+ enum protocol_type type , u32 * vf_cid )
383382{
384383 if (vf_cid )
385384 * vf_cid = p_hwfn -> p_cxt_mngr -> conn_cfg [type ].cids_per_vf ;
@@ -405,10 +404,10 @@ u32 qed_cxt_get_proto_tid_count(struct qed_hwfn *p_hwfn,
405404 return cnt ;
406405}
407406
408- static void
409- qed_cxt_set_proto_tid_count ( struct qed_hwfn * p_hwfn ,
410- enum protocol_type proto ,
411- u8 seg , u8 seg_type , u32 count , bool has_fl )
407+ static void qed_cxt_set_proto_tid_count ( struct qed_hwfn * p_hwfn ,
408+ enum protocol_type proto ,
409+ u8 seg ,
410+ u8 seg_type , u32 count , bool has_fl )
412411{
413412 struct qed_cxt_mngr * p_mngr = p_hwfn -> p_cxt_mngr ;
414413 struct qed_tid_seg * p_seg = & p_mngr -> conn_cfg [proto ].tid_seg [seg ];
@@ -420,8 +419,7 @@ qed_cxt_set_proto_tid_count(struct qed_hwfn *p_hwfn,
420419
421420static void qed_ilt_cli_blk_fill (struct qed_ilt_client_cfg * p_cli ,
422421 struct qed_ilt_cli_blk * p_blk ,
423- u32 start_line , u32 total_size ,
424- u32 elem_size )
422+ u32 start_line , u32 total_size , u32 elem_size )
425423{
426424 u32 ilt_size = ILT_PAGE_IN_BYTES (p_cli -> p_size .val );
427425
@@ -448,8 +446,7 @@ static void qed_ilt_cli_adv_line(struct qed_hwfn *p_hwfn,
448446 p_cli -> first .val = * p_line ;
449447
450448 p_cli -> active = true;
451- * p_line += DIV_ROUND_UP (p_blk -> total_size ,
452- p_blk -> real_size_in_page );
449+ * p_line += DIV_ROUND_UP (p_blk -> total_size , p_blk -> real_size_in_page );
453450 p_cli -> last .val = * p_line - 1 ;
454451
455452 DP_VERBOSE (p_hwfn , QED_MSG_ILT ,
@@ -926,12 +923,9 @@ static int qed_ilt_blk_alloc(struct qed_hwfn *p_hwfn,
926923 void * p_virt ;
927924 u32 size ;
928925
929- size = min_t (u32 , sz_left ,
930- p_blk -> real_size_in_page );
926+ size = min_t (u32 , sz_left , p_blk -> real_size_in_page );
931927 p_virt = dma_alloc_coherent (& p_hwfn -> cdev -> pdev -> dev ,
932- size ,
933- & p_phys ,
934- GFP_KERNEL );
928+ size , & p_phys , GFP_KERNEL );
935929 if (!p_virt )
936930 return - ENOMEM ;
937931 memset (p_virt , 0 , size );
@@ -976,7 +970,7 @@ static int qed_ilt_shadow_alloc(struct qed_hwfn *p_hwfn)
976970 for (j = 0 ; j < ILT_CLI_PF_BLOCKS ; j ++ ) {
977971 p_blk = & clients [i ].pf_blks [j ];
978972 rc = qed_ilt_blk_alloc (p_hwfn , p_blk , i , 0 );
979- if (rc != 0 )
973+ if (rc )
980974 goto ilt_shadow_fail ;
981975 }
982976 for (k = 0 ; k < p_mngr -> vf_count ; k ++ ) {
@@ -985,7 +979,7 @@ static int qed_ilt_shadow_alloc(struct qed_hwfn *p_hwfn)
985979
986980 p_blk = & clients [i ].vf_blks [j ];
987981 rc = qed_ilt_blk_alloc (p_hwfn , p_blk , i , lines );
988- if (rc != 0 )
982+ if (rc )
989983 goto ilt_shadow_fail ;
990984 }
991985 }
@@ -1672,7 +1666,7 @@ static void qed_tm_init_pf(struct qed_hwfn *p_hwfn)
16721666 p_hwfn -> rel_pf_id * NUM_TASK_PF_SEGMENTS + i );
16731667
16741668 STORE_RT_REG_AGG (p_hwfn , rt_reg , cfg_word );
1675- active_seg_mask |= (tm_iids .pf_tids [i ] ? ( 1 << i ) : 0 );
1669+ active_seg_mask |= (tm_iids .pf_tids [i ] ? BIT ( i ) : 0 );
16761670
16771671 tm_offset += tm_iids .pf_tids [i ];
16781672 }
@@ -1702,8 +1696,7 @@ void qed_cxt_hw_init_pf(struct qed_hwfn *p_hwfn)
17021696}
17031697
17041698int qed_cxt_acquire_cid (struct qed_hwfn * p_hwfn ,
1705- enum protocol_type type ,
1706- u32 * p_cid )
1699+ enum protocol_type type , u32 * p_cid )
17071700{
17081701 struct qed_cxt_mngr * p_mngr = p_hwfn -> p_cxt_mngr ;
17091702 u32 rel_cid ;
@@ -1717,8 +1710,7 @@ int qed_cxt_acquire_cid(struct qed_hwfn *p_hwfn,
17171710 p_mngr -> acquired [type ].max_count );
17181711
17191712 if (rel_cid >= p_mngr -> acquired [type ].max_count ) {
1720- DP_NOTICE (p_hwfn , "no CID available for protocol %d\n" ,
1721- type );
1713+ DP_NOTICE (p_hwfn , "no CID available for protocol %d\n" , type );
17221714 return - EINVAL ;
17231715 }
17241716
@@ -1730,8 +1722,7 @@ int qed_cxt_acquire_cid(struct qed_hwfn *p_hwfn,
17301722}
17311723
17321724static bool qed_cxt_test_cid_acquired (struct qed_hwfn * p_hwfn ,
1733- u32 cid ,
1734- enum protocol_type * p_type )
1725+ u32 cid , enum protocol_type * p_type )
17351726{
17361727 struct qed_cxt_mngr * p_mngr = p_hwfn -> p_cxt_mngr ;
17371728 struct qed_cid_acquired_map * p_map ;
@@ -1763,8 +1754,7 @@ static bool qed_cxt_test_cid_acquired(struct qed_hwfn *p_hwfn,
17631754 return true;
17641755}
17651756
1766- void qed_cxt_release_cid (struct qed_hwfn * p_hwfn ,
1767- u32 cid )
1757+ void qed_cxt_release_cid (struct qed_hwfn * p_hwfn , u32 cid )
17681758{
17691759 struct qed_cxt_mngr * p_mngr = p_hwfn -> p_cxt_mngr ;
17701760 enum protocol_type type ;
@@ -1781,8 +1771,7 @@ void qed_cxt_release_cid(struct qed_hwfn *p_hwfn,
17811771 __clear_bit (rel_cid , p_mngr -> acquired [type ].cid_map );
17821772}
17831773
1784- int qed_cxt_get_cid_info (struct qed_hwfn * p_hwfn ,
1785- struct qed_cxt_info * p_info )
1774+ int qed_cxt_get_cid_info (struct qed_hwfn * p_hwfn , struct qed_cxt_info * p_info )
17861775{
17871776 struct qed_cxt_mngr * p_mngr = p_hwfn -> p_cxt_mngr ;
17881777 u32 conn_cxt_size , hw_p_size , cxts_per_p , line ;
0 commit comments