Some functions have 1.5K+ line of code. It's hard to maintain those functions. We should refactor it into smaller sub-functions.
For example:
line 1863: uint32_t mds_mcm_svc_up(PW_ENV_ID pwe_id, MDS_SVC_ID svc_id, V_DEST_RL role, line 1864: NCSMDS_SCOPE_TYPE scope, MDS_VDEST_ID vdest_id, line 1865: NCS_VDEST_TYPE vdest_policy, MDS_DEST adest, line 1866: bool my_pcon, MDS_SVC_HDL local_svc_hdl, line 1867: MDS_SUBTN_REF_VAL subtn_ref_val, line 1868: MDS_SVC_PVT_SUB_PART_VER svc_sub_part_ver, line 1869: MDS_SVC_ARCHWORD_TYPE archword_type) line 1870: { .... line 3494: }
commit 8274994dd5a75157915f9af805b8ae6e7e2f4cb2 (HEAD -> develop, origin/develop, ticket-3294)
Author: hieu.h.hoang hieu.h.hoang@dektech.com.au
Date: Mon Mar 21 14:20:34 2022 +0700