From 8ca5fb4ef280090ecdca4f151816b5950d075d50 Mon Sep 17 00:00:00 2001
From: Cedric Roux <cedric.roux@eurecom.fr>
Date: Wed, 21 Feb 2018 11:53:13 +0100
Subject: [PATCH] integration: cleanup

- remove spaces at the end of lines
- remove useless dead code
  use: git show -p <this commit> -w
  to see it clearly
---
 openair1/PHY/CODING/lte_rate_matching.c       |   8 +-
 openair1/PHY/INIT/defs.h                      |   4 +-
 openair1/PHY/INIT/lte_init_ru.c               |   5 -
 openair1/PHY/INIT/lte_param_init.c            |   8 +-
 .../lte_ul_channel_estimation.c               |   3 -
 openair1/PHY/LTE_TRANSPORT/dci.c              |  54 +++---
 openair1/PHY/LTE_TRANSPORT/dci_tools.c        |   6 -
 openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c   |   5 -
 .../PHY/LTE_TRANSPORT/dlsch_demodulation.c    |   9 +-
 openair1/PHY/LTE_TRANSPORT/drs_modulation.c   |   2 +-
 openair1/PHY/MODULATION/slot_fep_ul.c         |   3 -
 openair1/SCHED/fapi_l1.c                      |   8 +-
 openair1/SCHED/phy_procedures_lte_eNb.c       |   5 -
 openair1/SCHED/phy_procedures_lte_ue.c        |   6 +-
 openair1/SCHED/ru_procedures.c                |   2 +-
 openair1/SIMULATION/LTE_PHY/dlsim.c           |  62 +++---
 openair1/SIMULATION/LTE_PHY/ulsim.c           |  56 +++---
 .../CONTROL_MODULES/MAC/flexran_agent_mac.c   | 182 +++++++++---------
 openair2/LAYER2/MAC/defs.h                    |  76 ++++----
 openair2/LAYER2/MAC/eNB_scheduler_dlsch.c     |  22 +--
 20 files changed, 239 insertions(+), 287 deletions(-)

diff --git a/openair1/PHY/CODING/lte_rate_matching.c b/openair1/PHY/CODING/lte_rate_matching.c
index f96e5dbb17..41c3c5e5a9 100644
--- a/openair1/PHY/CODING/lte_rate_matching.c
+++ b/openair1/PHY/CODING/lte_rate_matching.c
@@ -463,7 +463,7 @@ uint32_t lte_rate_matching_turbo(uint32_t RTC,
                                  uint8_t Qm,
                                  uint8_t Nl,
                                  uint8_t r,
-                                 uint8_t nb_rb) 
+                                 uint8_t nb_rb)
 //                                 uint8_t m)
 {
 
@@ -513,7 +513,7 @@ uint32_t lte_rate_matching_turbo(uint32_t RTC,
   //    counter_buffer[rvidx][cnt]=0;
   if (Ncb>(3*(RTC<<5)))
     AssertFatal(1==0,"Exiting, RM condition (Ncb %d, RTC %d, Nir/C %d, Nsoft %d, Kw %d)\n",Ncb,RTC,Nir/C,Nsoft,3*(RTC<<5));
-  
+
   AssertFatal(Nl>0,"Nl is 0\n");
   AssertFatal(Qm>0,"Qm is 0\n");
   Gp = G/Nl/Qm;
@@ -750,8 +750,8 @@ int lte_rate_matching_turbo_rx(uint32_t RTC,
   for (; (ind<Ncb)&&(k<E); ind++) {
     if (dummy_w[ind] != LTE_NULL) {
       /*
-      if ((w[ind]>0 && soft_input2[k]<0) || 
-	  (w[ind]<0 && soft_input2[k]>0))  
+      if ((w[ind]>0 && soft_input2[k]<0) ||
+	  (w[ind]<0 && soft_input2[k]>0))
 	  printf("ind %d: w %d => soft_in %d\n",ind,w[ind],soft_input2[k]);*/
       w[ind] += soft_input2[k++];
 #ifdef RM_DEBUG
diff --git a/openair1/PHY/INIT/defs.h b/openair1/PHY/INIT/defs.h
index 2c92503133..be3e5c160b 100644
--- a/openair1/PHY/INIT/defs.h
+++ b/openair1/PHY/INIT/defs.h
@@ -333,13 +333,13 @@ void init_lte_top(LTE_DL_FRAME_PARMS *lte_frame_parms);
 void lte_param_init(PHY_VARS_eNB **eNBp,
 		    PHY_VARS_UE **UEp,
 		    RU_t **rup,
-		    unsigned char N_tx_port_eNB, 
+		    unsigned char N_tx_port_eNB,
                     unsigned char N_tx_phy,
 		    unsigned char N_rx_ru,
 		    unsigned char N_rx_ue,
 		    unsigned char transmission_mode,
 		    uint8_t extended_prefix_flag,
-		    frame_t frame_type, 
+		    frame_t frame_type,
 		    uint16_t Nid_cell,
 		    uint8_t tdd_config,
 		    uint8_t N_RB_DL,
diff --git a/openair1/PHY/INIT/lte_init_ru.c b/openair1/PHY/INIT/lte_init_ru.c
index f6c4d0709a..9168193074 100644
--- a/openair1/PHY/INIT/lte_init_ru.c
+++ b/openair1/PHY/INIT/lte_init_ru.c
@@ -32,11 +32,6 @@
 #include "assertions.h"
 #include <math.h>
 
-#undef LOG_I
-#define LOG_I(A,B,C...) printf(B,C)
-#undef LOG_D
-#define LOG_D(A,B,C...) printf(B,C)
-
 int phy_init_RU(RU_t *ru) {
 
   LTE_DL_FRAME_PARMS *fp = &ru->frame_parms;
diff --git a/openair1/PHY/INIT/lte_param_init.c b/openair1/PHY/INIT/lte_param_init.c
index c09652db93..1743a8d90c 100644
--- a/openair1/PHY/INIT/lte_param_init.c
+++ b/openair1/PHY/INIT/lte_param_init.c
@@ -37,13 +37,13 @@ extern RU_t *ru;
 void lte_param_init(PHY_VARS_eNB **eNBp,
 		    PHY_VARS_UE **UEp,
 		    RU_t **rup,
-		    unsigned char N_tx_port_eNB, 
+		    unsigned char N_tx_port_eNB,
                     unsigned char N_tx_phy,
 		    unsigned char N_rx_ru,
                     unsigned char N_rx_ue,
 		    unsigned char transmission_mode,
 		    uint8_t extended_prefix_flag,
-		    frame_t frame_type, 
+		    frame_t frame_type,
 		    uint16_t Nid_cell,
 		    uint8_t tdd_config,
 		    uint8_t N_RB_DL,
@@ -142,7 +142,7 @@ void lte_param_init(PHY_VARS_eNB **eNBp,
 
   // DL power control init
   //if (transmission_mode == 1) {
-  UE->pdsch_config_dedicated->p_a  = pa; 
+  UE->pdsch_config_dedicated->p_a  = pa;
 
   if (transmission_mode == 1 || transmission_mode ==7) {
     ((eNB->frame_parms).pdsch_config_common).p_b = 0;
@@ -161,7 +161,7 @@ void lte_param_init(PHY_VARS_eNB **eNBp,
     if      (eNB->frame_parms.N_RB_DL == 100) ru->N_TA_offset = 624;
     else if (eNB->frame_parms.N_RB_DL == 50)  ru->N_TA_offset = 624/2;
     else if (eNB->frame_parms.N_RB_DL == 25)  ru->N_TA_offset = 624/4;
-  } 
+  }
   else ru->N_TA_offset=0;
 
   printf("Done lte_param_init\n");
diff --git a/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c b/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
index 9eb34a8905..9c91d28ade 100644
--- a/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
+++ b/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
@@ -34,9 +34,6 @@ static int16_t ru_90c[2*128] = {32767, 0,32766, -402,32758, -804,32746, -1206,32
 
 #define SCALE 0x3FFF
 
-//#undef LOG_D
-//#define LOG_D(A,B,C...) printf(B,C)
-
 int32_t lte_ul_channel_estimation(PHY_VARS_eNB *eNB,
 				  eNB_rxtx_proc_t *proc,
                                   uint8_t UE_id,
diff --git a/openair1/PHY/LTE_TRANSPORT/dci.c b/openair1/PHY/LTE_TRANSPORT/dci.c
index f75ae326e9..94d6cd9c3f 100755
--- a/openair1/PHY/LTE_TRANSPORT/dci.c
+++ b/openair1/PHY/LTE_TRANSPORT/dci.c
@@ -35,10 +35,10 @@
 #include "PHY/defs.h"
 #include "PHY/extern.h"
 #include "SCHED/defs.h"
-#include "SIMULATION/TOOLS/defs.h" // for taus 
+#include "SIMULATION/TOOLS/defs.h" // for taus
 #include "PHY/sse_intrin.h"
 
-#include "assertions.h" 
+#include "assertions.h"
 #include "T.h"
 #include "UTIL/LOG/log.h"
 #include "UTIL/LOG/vcd_signal_dumper.h"
@@ -52,9 +52,6 @@
 //extern uint16_t phich_reg[MAX_NUM_PHICH_GROUPS][3];
 //extern uint16_t pcfich_reg[4];
 
-//#undef LOG_D
-//#define LOG_D(A,B,C...) printf(B,C)
-
 uint32_t check_phich_reg(LTE_DL_FRAME_PARMS *frame_parms,uint32_t kprime,uint8_t lprime,uint8_t mi)
 {
 
@@ -155,7 +152,7 @@ uint16_t extract_crc(uint8_t *dci,uint8_t dci_len)
   //  dci[(dci_len>>3)+1] = 0;
   //  dci[(dci_len>>3)+2] = 0;
   return((uint16_t)crc16);
-  
+
 }
 
 
@@ -218,10 +215,10 @@ uint8_t *generate_dci0(uint8_t *dci,
   uint16_t coded_bits;
   uint8_t dci_flip[8];
 
-  AssertFatal((aggregation_level==1) || 
-	      (aggregation_level==2) || 
-	      (aggregation_level==4) || 
-	      (aggregation_level==8) 
+  AssertFatal((aggregation_level==1) ||
+	      (aggregation_level==2) ||
+	      (aggregation_level==4) ||
+	      (aggregation_level==8)
 #ifdef Rel14 // Added for EPDCCH/MPDCCH
 	      ||
 	      (aggregation_level==16) ||
@@ -230,17 +227,17 @@ uint8_t *generate_dci0(uint8_t *dci,
 #endif
 	      ,
 	      "generate_dci FATAL, illegal aggregation_level %d\n",aggregation_level);
-  
+
 
   coded_bits = 72 * aggregation_level;
 
-  
+
 
   #ifdef DEBUG_DCI_ENCODING
   for (int i=0;i<1+((DCI_LENGTH+16)/8);i++)
     printf("i %d : %x\n",i,dci[i]);
   #endif
-  
+
   if (DCI_LENGTH<=32) {
     dci_flip[0] = dci[3];
     dci_flip[1] = dci[2];
@@ -480,7 +477,7 @@ void pdcch_deinterleaving(LTE_DL_FRAME_PARMS *frame_parms,uint16_t *z, uint16_t
     wptr[1] = wptr2[1];
     wptr[2] = wptr2[2];
     wptr[3] = wptr2[3];
-    /*    
+    /*
     printf("pdcch_deinterleaving (%p,%p): quad %d (%d) -> (%d,%d %d,%d %d,%d %d,%d)\n",wptr,wptr2,i,(i+frame_parms->Nid_cell)%Mquad,
 	   ((char*)wptr2)[0],
 	   ((char*)wptr2)[1],
@@ -519,7 +516,7 @@ void pdcch_deinterleaving(LTE_DL_FRAME_PARMS *frame_parms,uint16_t *z, uint16_t
         zptr[2] = wptr[2];
         zptr[3] = wptr[3];
 
-	/*        
+	/*
         printf("deinterleaving ; k %d, index-Nd %d  => (%d,%d,%d,%d,%d,%d,%d,%d)\n",k,(index-ND),
                ((int8_t *)wptr)[0],
                ((int8_t *)wptr)[1],
@@ -540,7 +537,7 @@ void pdcch_deinterleaving(LTE_DL_FRAME_PARMS *frame_parms,uint16_t *z, uint16_t
 
   for (i=0; i<Mquad; i++) {
     zptr = &z[i<<2];
-    /*    
+    /*
     printf("deinterleaving ; quad %d  => (%d,%d,%d,%d,%d,%d,%d,%d)\n",i,
      ((int8_t *)zptr)[0],
      ((int8_t *)zptr)[1],
@@ -550,7 +547,7 @@ void pdcch_deinterleaving(LTE_DL_FRAME_PARMS *frame_parms,uint16_t *z, uint16_t
      ((int8_t *)zptr)[5],
      ((int8_t *)zptr)[6],
      ((int8_t *)zptr)[7]);
-    */  
+    */
   }
 
 }
@@ -1513,7 +1510,7 @@ void pdcch_channel_compensation(int32_t **rxdataF_ext,
       dl_ch128_2    = (__m128i *)&dl_ch_estimates_ext[2+aarx][symbol*frame_parms->N_RB_DL*12];
 
 #elif defined(__arm__)
-      
+
 #endif
       for (rb=0; rb<frame_parms->N_RB_DL; rb++) {
 #if defined(__x86_64__) || defined(__i386__)
@@ -2114,7 +2111,7 @@ void pdcch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
       reset = 0;
     }
 
-    
+
     //    printf("unscrambling %d : e %d, c %d => ",i,llr[i],((s>>(i&0x1f))&1));
     if (((s>>(i%32))&1)==0)
       llr[i] = -llr[i];
@@ -2348,7 +2345,7 @@ uint8_t generate_dci_top(uint8_t num_pdcch_symbols,
 
 
     for (i=0; i<Msymb2; i++) {
-      
+
       //((int16_t*)(&(y[0][i])))[0] = (*e_ptr == 1) ? -gain_lin_QPSK : gain_lin_QPSK;
       //((int16_t*)(&(y[1][i])))[0] = (*e_ptr == 1) ? -gain_lin_QPSK : gain_lin_QPSK;
       ((int16_t*)(&(y[0][i])))[0] = (*e_ptr == 2) ? 0 : (*e_ptr == 1) ? -gain_lin_QPSK : gain_lin_QPSK;
@@ -2662,15 +2659,15 @@ uint16_t get_nCCE_mac(uint8_t Mod_id,uint8_t CC_id,int num_pdcch_symbols,int sub
   // check for eNB only !
   return(get_nCCE(num_pdcch_symbols,
 		  &RC.eNB[Mod_id][CC_id]->frame_parms,
-		  get_mi(&RC.eNB[Mod_id][CC_id]->frame_parms,subframe))); 
+		  get_mi(&RC.eNB[Mod_id][CC_id]->frame_parms,subframe)));
 }
 
 
 int get_nCCE_offset_l1(int *CCE_table,
-		       const unsigned char L, 
-		       const int nCCE, 
-		       const int common_dci, 
-		       const unsigned short rnti, 
+		       const unsigned char L,
+		       const int nCCE,
+		       const int common_dci,
+		       const unsigned short rnti,
 		       const unsigned char subframe)
 {
 
@@ -2700,7 +2697,7 @@ int get_nCCE_offset_l1(int *CCE_table,
           break;
         }
       }
-     
+
       if (search_space_free == 1) {
 
 	//	printf("returning %d\n",m*L);
@@ -3023,7 +3020,7 @@ void dci_decoding_procedure0(LTE_UE_PDCCH **pdcch_vars,
          return;
       } // rnti match
     }  // CCEmap_cand == 0
-/*    
+/*
 	if ( agregationLevel != 0xFF &&
         (format_c == format0 && m==0 && si_rnti != SI_RNTI))
     {
@@ -4246,6 +4243,3 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
 
   return(dci_cnt);
 }
-
-
-
diff --git a/openair1/PHY/LTE_TRANSPORT/dci_tools.c b/openair1/PHY/LTE_TRANSPORT/dci_tools.c
index dd4228a9f9..4b73de6fcc 100644
--- a/openair1/PHY/LTE_TRANSPORT/dci_tools.c
+++ b/openair1/PHY/LTE_TRANSPORT/dci_tools.c
@@ -44,12 +44,6 @@
 #include "LAYER2/MAC/extern.h"
 #include "LAYER2/MAC/defs.h"
 
-/*#undef LOG_D
-#define LOG_D(A,B,C...) printf(B,C)
-#undef LOG_I
-#define LOG_I(A,B,C...) printf(B,C)
-*/
-
 //#define DEBUG_DCI
 
 uint32_t localRIV2alloc_LUT6[32];
diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c b/openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c
index 71399c2652..697164110b 100644
--- a/openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c
+++ b/openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c
@@ -39,11 +39,6 @@
 //#define DEBUG_DLSCH_DECODING
 //#define UE_DEBUG_TRACE 1
 
-//#undef LOG_D
-//#define LOG_D(A,B,C...) printf(B,C)
-//#undef LOG_I
-//#define LOG_I(A,B,C...) printf(B,C)
-
 extern double cpuf;
 
 void free_ue_dlsch(LTE_UE_DLSCH_t *dlsch)
diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c b/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c
index 062cb8d299..1becc98752 100644
--- a/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c
+++ b/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c
@@ -48,11 +48,6 @@ int16_t interf_unaw_shift = 13;
 
 //#define DEBUG_HARQ
 
-//#undef LOG_D
-//#define LOG_D(A,B,C...) printf(B,C)
-//#undef LOG_I
-//#define LOG_I(A,B,C...) printf(B,C)
-
 #define DEBUG_PHY 1
 //#define DEBUG_DLSCH_DEMOD 1
 
@@ -847,7 +842,7 @@ int rx_pdsch(PHY_VARS_UE *ue,
   pllr_symbol_cw1  = (int8_t*)pdsch_vars[eNB_id]->llr[1];
   pllr_symbol_cw0 += llr_offset_symbol;
   pllr_symbol_cw1 += llr_offset_symbol;
-  
+
   LOG_I(PHY,"compute LLRs [AbsSubframe %d.%d-%d] NbRB %d Qm %d LLRs-Length %d LLR-Offset %d @LLR Buff %x @LLR Buff(symb) %x\n",
              frame, subframe,symbol,
              nb_rb,dlsch0_harq->Qm,
@@ -855,7 +850,7 @@ int rx_pdsch(PHY_VARS_UE *ue,
              pdsch_vars[eNB_id]->llr_offset[symbol],
              (int16_t*)pdsch_vars[eNB_id]->llr[0],
              pllr_symbol_cw0);
-  
+
   switch (dlsch0_harq->Qm) {
   case 2 :
     if ((rx_type==rx_standard) || (codeword_TB1 == -1)) {
diff --git a/openair1/PHY/LTE_TRANSPORT/drs_modulation.c b/openair1/PHY/LTE_TRANSPORT/drs_modulation.c
index 101954ca3d..a0bde219b5 100644
--- a/openair1/PHY/LTE_TRANSPORT/drs_modulation.c
+++ b/openair1/PHY/LTE_TRANSPORT/drs_modulation.c
@@ -94,7 +94,7 @@ int generate_drs_pusch(PHY_VARS_UE *ue,
        l<frame_parms->symbols_per_tti;
        l += (7 - frame_parms->Ncp),u=u1,v=v1,cyclic_shift=cyclic_shift1) {
 
-    drs_offset = 0;  
+    drs_offset = 0;
 #ifdef DEBUG_DRS
     printf("drs_modulation: Msc_RS = %d, Msc_RS_idx = %d, u=%d,v=%d\n",Msc_RS, Msc_RS_idx,u,v);
 #endif
diff --git a/openair1/PHY/MODULATION/slot_fep_ul.c b/openair1/PHY/MODULATION/slot_fep_ul.c
index 844d15a87e..f41fc98791 100644
--- a/openair1/PHY/MODULATION/slot_fep_ul.c
+++ b/openair1/PHY/MODULATION/slot_fep_ul.c
@@ -24,9 +24,6 @@
 #include "defs.h"
 //#define DEBUG_FEP
 
-//#undef LOG_D
-//#define LOG_D(A,B,C...) printf(B,C)
-
 int slot_fep_ul(RU_t *ru,
                 unsigned char l,
                 unsigned char Ns,
diff --git a/openair1/SCHED/fapi_l1.c b/openair1/SCHED/fapi_l1.c
index 6d7132c091..dbefe62747 100644
--- a/openair1/SCHED/fapi_l1.c
+++ b/openair1/SCHED/fapi_l1.c
@@ -37,12 +37,6 @@
 #include "nfapi_interface.h"
 #include "fapi_l1.h"
 
-/*#undef LOG_D
-#define LOG_D(A,B,C...) printf(B,C)
-#undef LOG_I
-#define LOG_I(A,B,C...) printf(B,C)
-*/
-
 int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req);
 int oai_nfapi_tx_req(nfapi_tx_request_t *tx_req);
 int oai_nfapi_hi_dci0_req(nfapi_hi_dci0_request_t *hi_dci0_req);
@@ -539,7 +533,7 @@ void handle_nfapi_ul_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
   int8_t UE_id;
 
   // check if we have received a dci for this ue and ulsch descriptor is configured
-  
+
   if (ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_ULSCH_PDU_TYPE) {
     AssertFatal((UE_id = find_ulsch(ul_config_pdu->ulsch_pdu.ulsch_pdu_rel8.rnti,eNB,SEARCH_EXIST_OR_FREE))>=0,
                 "No existing UE ULSCH for rnti %x\n",rel8->rnti);
diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c
index 496767ca4d..105dac0808 100644
--- a/openair1/SCHED/phy_procedures_lte_eNb.c
+++ b/openair1/SCHED/phy_procedures_lte_eNb.c
@@ -50,11 +50,6 @@
 #   include "intertask_interface.h"
 #endif
 
-/*
-#undef LOG_D
-#define LOG_D(A,B,C...) printf(B,C)
-*/
-
 extern uint8_t nfapi_mode;
 int oai_nfapi_rach_ind(nfapi_rach_indication_t *rach_ind);
 
diff --git a/openair1/SCHED/phy_procedures_lte_ue.c b/openair1/SCHED/phy_procedures_lte_ue.c
index d1097503ea..2635649589 100644
--- a/openair1/SCHED/phy_procedures_lte_ue.c
+++ b/openair1/SCHED/phy_procedures_lte_ue.c
@@ -73,10 +73,6 @@
 
 extern double cpuf;
 
-//#undef LOG_D
-//#define LOG_D(A,B,C...) printf(B,C)
-
-
 void Msg1_transmitted(module_id_t module_idP,uint8_t CC_id,frame_t frameP, uint8_t eNB_id);
 void Msg3_transmitted(module_id_t module_idP,uint8_t CC_id,frame_t frameP, uint8_t eNB_id);
 
@@ -1301,7 +1297,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt
 #endif
 			nsymb>>1,
 			&ue->frame_parms);
-      
+
       normal_prefix_mod(&ue->common_vars.txdataF[aa][((subframe_tx*nsymb)+(nsymb>>1))*frame_parms->ofdm_symbol_size],
 #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)
 			dummy_tx_buffer+(frame_parms->samples_per_tti>>1),
diff --git a/openair1/SCHED/ru_procedures.c b/openair1/SCHED/ru_procedures.c
index 0aad195d43..b00a9e2039 100644
--- a/openair1/SCHED/ru_procedures.c
+++ b/openair1/SCHED/ru_procedures.c
@@ -536,7 +536,7 @@ void fep_full(RU_t *ru) {
 
   start_meas(&ru->ofdm_demod_stats);
   if (ru->idx == 0) VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX, 1 );
-  
+
   remove_7_5_kHz(ru,proc->subframe_rx<<1);
   remove_7_5_kHz(ru,1+(proc->subframe_rx<<1));
 
diff --git a/openair1/SIMULATION/LTE_PHY/dlsim.c b/openair1/SIMULATION/LTE_PHY/dlsim.c
index 2de1698450..885d29cc4e 100644
--- a/openair1/SIMULATION/LTE_PHY/dlsim.c
+++ b/openair1/SIMULATION/LTE_PHY/dlsim.c
@@ -254,9 +254,9 @@ void DL_channel(RU_t *ru,PHY_VARS_UE *UE,uint subframe,int awgn_flag,double SNR,
 
 uint16_t
 fill_tx_req(nfapi_tx_request_body_t *tx_req_body,
-	    uint16_t                absSF, 
+	    uint16_t                absSF,
 	    uint16_t                pdu_length,
-	    uint16_t                pdu_index, 
+	    uint16_t                pdu_index,
 	    uint8_t                 *pdu)
 {
   nfapi_tx_request_pdu_t *TX_req = &tx_req_body->tx_pdu_list[tx_req_body->number_of_pdus];
@@ -384,7 +384,7 @@ void fill_DCI(PHY_VARS_eNB *eNB,
 	dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = n_rnti+k;
 	dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type = 1;	// CRNTI : see Table 4-10 from SCF082 - nFAPI specifications
 	dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power = 6000;	// equal to RS power
-	
+
 	dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.harq_process = 0;
 	dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc = TPC;	// dont adjust power when retransmitting
 	dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1 = ndi;
@@ -403,14 +403,14 @@ void fill_DCI(PHY_VARS_eNB *eNB,
 	dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
 
 
-	fill_dlsch_config(dl_req, 
-			  get_TBS_DL(mcs1,NB_RB), 
+	fill_dlsch_config(dl_req,
+			  get_TBS_DL(mcs1,NB_RB),
 			  (retrans > 0) ? -1 : 0, /* retransmission, no pdu_index */
-			  n_rnti, 
+			  n_rnti,
 			  0,	// type 0 allocation from 7.1.6 in 36.213
 			  0,	// virtual_resource_block_assignment_flag, unused here
-			  DLSCH_RB_ALLOC,	// resource_block_coding, 
-			  get_Qm(mcs1), 
+			  DLSCH_RB_ALLOC,	// resource_block_coding,
+			  get_Qm(mcs1),
 			  rv,	// redundancy version
 			  1,	// transport blocks
 			  0,	// transport block to codeword swap flag
@@ -419,7 +419,7 @@ void fill_DCI(PHY_VARS_eNB *eNB,
 			  1,	// number of subbands
 				//                      uint8_t codebook_index,
 			  4,	// UE category capacity
-			  pa,    // pa 
+			  pa,    // pa
 			  0,	// delta_power_offset for TM5
 			  0,	// ngap
 			  0,	// nprb
@@ -429,7 +429,7 @@ void fill_DCI(PHY_VARS_eNB *eNB,
 			  );
 	fill_tx_req(TX_req,
 		    (frame * 10) + subframe,
-		    get_TBS_DL(mcs1,NB_RB), 
+		    get_TBS_DL(mcs1,NB_RB),
 		    0,
 		    input_buffer[k]);
       }
@@ -441,26 +441,26 @@ void fill_DCI(PHY_VARS_eNB *eNB,
 
     case 3:
       if (common_flag == 0) {
-	
+
 	if (eNB->frame_parms.nb_antennas_tx == 2) {
-	  
+
 	  if (eNB->frame_parms.frame_type == TDD) {
-	    
+
 	  }
 	  else {
-	    
+
 	  }
 	}
       }
       break;
-      
+
     case 4:
       if (common_flag == 0) {
-	
+
 	if (eNB->frame_parms.nb_antennas_tx == 2) {
-	  
+
 	  if (eNB->frame_parms.frame_type == TDD) {
-	    
+
 
 	  }
 
@@ -564,7 +564,7 @@ int main(int argc, char **argv)
   //  char input_val_str[50],input_val_str2[50];
 
   char input_trch_val[16];
-  
+
   //  unsigned char pbch_pdu[6];
 
 
@@ -651,7 +651,7 @@ int main(int argc, char **argv)
   nfapi_dl_config_request_t DL_req;
   nfapi_ul_config_request_t UL_req;
   nfapi_hi_dci0_request_t HI_DCI0_req;
-  nfapi_dl_config_request_pdu_t dl_config_pdu_list[MAX_NUM_DL_PDU]; 
+  nfapi_dl_config_request_pdu_t dl_config_pdu_list[MAX_NUM_DL_PDU];
   nfapi_tx_request_pdu_t tx_pdu_list[MAX_NUM_TX_REQUEST_PDU];
   nfapi_tx_request_t TX_req;
   Sched_Rsp_t sched_resp;
@@ -1155,7 +1155,7 @@ int main(int argc, char **argv)
 
   uint8_t input_buffer[NUMBER_OF_UE_MAX][20000];
 
-  for (i=0;i<n_users;i++) 
+  for (i=0;i<n_users;i++)
     for (j=0;j<20000;j++) input_buffer[i][j] = (uint8_t)((taus())&255);
 
   frame_parms = &eNB->frame_parms;
@@ -1585,7 +1585,7 @@ int main(int argc, char **argv)
 			 (TB0_active==1)?mcs1:0,mcs2,!(trials&1),(TB0_active==1)?round&3:0,pa,&num_common_dci,&num_ue_spec_dci,&num_dci);
 	      }
 	    }
-	      
+
 	    proc_eNB->subframe_tx = subframe;
 	    sched_resp.subframe=subframe;
 	    sched_resp.frame=proc_eNB->frame_tx;
@@ -1610,7 +1610,7 @@ int main(int argc, char **argv)
 					      0,
 					      subframe,
 					      transmission_mode>=7?transmission_mode:0);
-	      
+
 	      uncoded_ber_bit = (short*) malloc(sizeof(short)*coded_bits_per_codeword);
 	      printf("uncoded_ber_bit=%p\n",uncoded_ber_bit);
 	    }
@@ -1736,13 +1736,13 @@ int main(int argc, char **argv)
 
 	    write_output("pdcch_rxF_comp0.m","pdcch0_rxF_comp0",UE->pdcch_vars[0][eNB_id]->rxdataF_comp[0],4*300,1,1);
 	    write_output("pdcch_rxF_llr.m","pdcch_llr",UE->pdcch_vars[0][eNB_id]->llr,2400,1,4);
-	    
+
 	    write_output("rxsig0.m","rxs0", &UE->common_vars.rxdata[0][0],10*UE->frame_parms.samples_per_tti,1,1);
 	    write_output("rxsigF0.m","rxsF0", &UE->common_vars.common_vars_rx_data_per_thread[UE->current_thread_id[subframe]].rxdataF[0][0],UE->frame_parms.ofdm_symbol_size*nsymb,1,1);
 
-	    
+
 	    exit(-1);
-	    
+
 	  }
 
 	  int bit_errors=0;
@@ -1755,9 +1755,9 @@ int main(int argc, char **argv)
 			       UE->pdsch_vars[UE->current_thread_id[subframe]][0]->llr[0],
 			       0,
 			       subframe<<1);
-	    for (i=0;i<coded_bits_per_codeword;i++) 
+	    for (i=0;i<coded_bits_per_codeword;i++)
 	      if ((eNB->dlsch[0][0]->harq_processes[0]->e[i]==1 && UE->pdsch_vars[UE->current_thread_id[subframe]][0]->llr[0][i] > 0)||
-		  (eNB->dlsch[0][0]->harq_processes[0]->e[i]==0 && UE->pdsch_vars[UE->current_thread_id[subframe]][0]->llr[0][i] < 0)) { 
+		  (eNB->dlsch[0][0]->harq_processes[0]->e[i]==0 && UE->pdsch_vars[UE->current_thread_id[subframe]][0]->llr[0][i] < 0)) {
 		uncoded_ber_bit[bit_errors++] = 1;
 		printf("error in pos %d : %d => %d\n",i,
 		       eNB->dlsch[0][0]->harq_processes[0]->e[i],
@@ -1770,10 +1770,10 @@ int main(int argc, char **argv)
 		       UE->pdsch_vars[UE->current_thread_id[subframe]][0]->llr[0][i]);
 		*/
 	      }
-	    
+
 	    write_output("dlsch_ber_bit.m","ber_bit",uncoded_ber_bit,coded_bits_per_codeword,1,0);
 	    write_output("ch0.m","ch0",eNB2UE[0]->ch[0],eNB2UE[0]->channel_length,1,8);
-	    
+
 	    if (eNB->frame_parms.nb_antennas_tx>1)
 	      write_output("ch1.m","ch1",eNB2UE[0]->ch[eNB->frame_parms.nb_antennas_rx],eNB2UE[0]->channel_length,1,8);
 
@@ -2488,7 +2488,7 @@ int main(int argc, char **argv)
 
   if (test_perf && !test_passed)
     return(-1);
-  else 
+  else
     return(0);
 }
 
diff --git a/openair1/SIMULATION/LTE_PHY/ulsim.c b/openair1/SIMULATION/LTE_PHY/ulsim.c
index 8381553bb7..d6009bc793 100644
--- a/openair1/SIMULATION/LTE_PHY/ulsim.c
+++ b/openair1/SIMULATION/LTE_PHY/ulsim.c
@@ -84,20 +84,20 @@ extern void ru_fep_full_2thread(RU_t *ru);
 nfapi_dl_config_request_t DL_req;
 nfapi_ul_config_request_t UL_req;
 nfapi_hi_dci0_request_t HI_DCI0_req;
-nfapi_ul_config_request_pdu_t ul_config_pdu_list[MAX_NUM_DL_PDU]; 
+nfapi_ul_config_request_pdu_t ul_config_pdu_list[MAX_NUM_DL_PDU];
 nfapi_tx_request_pdu_t tx_pdu_list[MAX_NUM_TX_REQUEST_PDU];
 nfapi_tx_request_t TX_req;
 Sched_Rsp_t sched_resp;
 
 void
-fill_nfapi_ulsch_config_request(nfapi_ul_config_request_pdu_t *ul_config_pdu, 
+fill_nfapi_ulsch_config_request(nfapi_ul_config_request_pdu_t *ul_config_pdu,
 				uint8_t                        cqi_req,
 				uint8_t                        p_eNB,
 				uint8_t                        cqi_ReportModeAperiodic,
 				uint8_t                        betaOffset_CQI_Index,
 				uint8_t                        betaOffset_RI_Index,
 				uint8_t                        dl_cqi_pmi_size,
-				uint8_t                        tmode, 
+				uint8_t                        tmode,
 				uint32_t                       handle,
 				uint16_t                       rnti,
 				uint8_t                        resource_block_start,
@@ -111,7 +111,7 @@ fill_nfapi_ulsch_config_request(nfapi_ul_config_request_pdu_t *ul_config_pdu,
 				uint8_t                        harq_process_number,
 				uint8_t                        ul_tx_mode,
 				uint8_t                        current_tx_nb,
-				uint8_t                        n_srs, 
+				uint8_t                        n_srs,
 				uint16_t                       size)
 {
   memset((void *) ul_config_pdu, 0, sizeof(nfapi_ul_config_request_pdu_t));
@@ -152,11 +152,11 @@ fill_nfapi_ulsch_config_request(nfapi_ul_config_request_pdu_t *ul_config_pdu,
     else if (p_eNB <= 2) ul_config_pdu->ulsch_cqi_ri_pdu.cqi_ri_information.cqi_ri_information_rel9.aperiodic_cqi_pmi_ri_report.cc[0].ri_size = 0;
     else if (p_eNB == 4) ul_config_pdu->ulsch_cqi_ri_pdu.cqi_ri_information.cqi_ri_information_rel9.aperiodic_cqi_pmi_ri_report.cc[0].ri_size = 2;
 
-    for (int ri = 0; 
-	 ri <  (1 << ul_config_pdu->ulsch_cqi_ri_pdu.cqi_ri_information.cqi_ri_information_rel9.aperiodic_cqi_pmi_ri_report.cc[0].ri_size); 
+    for (int ri = 0;
+	 ri <  (1 << ul_config_pdu->ulsch_cqi_ri_pdu.cqi_ri_information.cqi_ri_information_rel9.aperiodic_cqi_pmi_ri_report.cc[0].ri_size);
 	 ri++)
       ul_config_pdu->ulsch_cqi_ri_pdu.cqi_ri_information.cqi_ri_information_rel9.aperiodic_cqi_pmi_ri_report.cc[0].dl_cqi_pmi_size[ri] =	dl_cqi_pmi_size;
-    
+
     ul_config_pdu->ulsch_cqi_ri_pdu.cqi_ri_information.cqi_ri_information_rel9.delta_offset_cqi = betaOffset_CQI_Index;
     ul_config_pdu->ulsch_cqi_ri_pdu.cqi_ri_information.cqi_ri_information_rel9.delta_offset_ri  = betaOffset_RI_Index;
   }
@@ -263,17 +263,17 @@ void fill_ulsch_dci(PHY_VARS_eNB *eNB,
     break;
   }
 
-  fill_nfapi_ulsch_config_request(&ul_req->ul_config_pdu_list[0], 
-				  cqi_flag&1, 
+  fill_nfapi_ulsch_config_request(&ul_req->ul_config_pdu_list[0],
+				  cqi_flag&1,
 				  1,  // p_eNB
 				  0,  // reportmode Aperiodic
 				  beta_CQI,
 				  beta_RI,
 				  cqi_size,
-				  //cc, 
-				  //UE_template->physicalConfigDedicated, 
+				  //cc,
+				  //UE_template->physicalConfigDedicated,
 				  1,
-				  0, 
+				  0,
 				  14,     // rnti
 				  first_rb,	// resource_block_start
 				  nb_rb,	// number_of_resource_blocks
@@ -292,7 +292,7 @@ void fill_ulsch_dci(PHY_VARS_eNB *eNB,
   sched_resp->UL_req->header.message_id = NFAPI_UL_CONFIG_REQUEST;
   ul_req->number_of_pdus=1;
   ul_req->tl.tag = NFAPI_UL_CONFIG_REQUEST_BODY_TAG;
-  
+
 }
 
 extern void eNB_fep_full(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc);
@@ -740,7 +740,7 @@ int main(int argc, char **argv)
   for (int k=0;k<eNB->RU_list[0]->nb_rx;k++) eNB->common_vars.rxdataF[k]     =  eNB->RU_list[0]->common.rxdataF[k];
 
   memset((void*)&eNB->UL_INFO,0,sizeof(eNB->UL_INFO));
-  
+
   printf("Setting indication lists\n");
   eNB->UL_INFO.rx_ind.rx_indication_body.rx_pdu_list   = eNB->rx_pdu_list;
   eNB->UL_INFO.crc_ind.crc_indication_body.crc_pdu_list = eNB->crc_pdu_list;
@@ -922,7 +922,7 @@ int main(int argc, char **argv)
 
 
   UE->mac_enabled=0;
-  
+
   eNB_rxtx_proc_t *proc_rxtx   = &eNB->proc.proc_rxtx[subframe&1];
   UE_rxtx_proc_t *proc_rxtx_ue = &UE->proc.proc_rxtx[subframe&1];
   proc_rxtx->frame_rx=1;
@@ -1102,7 +1102,7 @@ int main(int argc, char **argv)
       reset_meas(&eNB->ulsch_tc_intl1_stats);
       reset_meas(&eNB->ulsch_tc_intl2_stats);
 
-      // initialization 
+      // initialization
       struct list time_vector_tx;
       initialize(&time_vector_tx);
       struct list time_vector_tx_ifft;
@@ -1137,10 +1137,10 @@ int main(int argc, char **argv)
         while (round < 4) {
 	  proc_rxtx->frame_rx=1;
 	  proc_rxtx->subframe_rx=subframe;
-	  
+
 	  proc_rxtx->frame_tx=pdcch_alloc2ul_frame(&eNB->frame_parms,1,subframe);
 	  proc_rxtx->subframe_tx=pdcch_alloc2ul_subframe(&eNB->frame_parms,subframe);
-	  
+
 	  proc_rxtx_ue->frame_tx = proc_rxtx->frame_rx;
 	  proc_rxtx_ue->frame_rx = (subframe<4)?(proc_rxtx->frame_tx-1):(proc_rxtx->frame_tx);
 	  proc_rxtx_ue->subframe_tx = proc_rxtx->subframe_rx;
@@ -1158,7 +1158,7 @@ int main(int argc, char **argv)
 	  if (mcs < 11)      modulation_type = 2;
 	  else if (mcs < 21) modulation_type = 4;
 	  else if (mcs < 29) modulation_type = 6;
- 
+
 	  fill_ulsch_dci(eNB,proc_rxtx->frame_rx,subframe,&sched_resp,14,(void*)&UL_alloc_pdu,first_rb,nb_rb,(round==0)?mcs:(28+rvidx[round]),modulation_type,ndi,cqi_flag,beta_CQI,beta_RI,cqi_size);
 
 	  UE->ulsch_Msg3_active[eNB_id] = 0;
@@ -1216,16 +1216,16 @@ int main(int argc, char **argv)
 
 	    tx_lev = signal_energy(&UE->common_vars.txdata[0][eNB->frame_parms.samples_per_tti*subframe],
 				   eNB->frame_parms.samples_per_tti);
-	    
-	    
+
+
             if (n_frames==1) {
               write_output("txsigF0UL.m","txsF0", &UE->common_vars.txdataF[0][eNB->frame_parms.ofdm_symbol_size*nsymb*subframe],eNB->frame_parms.ofdm_symbol_size*nsymb,1,
                            1);
               //write_output("txsigF1.m","txsF1", UE->common_vars.txdataF[0],FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX,1,1);
             }
-	    
+
 	  }  // input_fd == NULL
-	  
+
           tx_lev_dB = (unsigned int) dB_fixed_times10(tx_lev);
 
           if (n_frames==1) {
@@ -1337,7 +1337,7 @@ int main(int argc, char **argv)
 	  ru->feprx = (parallel_flag == 1) ? ru_fep_full_2thread        : fep_full;
 	  eNB->td  = (parallel_flag == 1) ? ulsch_decoding_data_2thread : ulsch_decoding_data;
 
-	  
+
 	  ru->feprx(ru);
 	  phy_procedures_eNB_uespec_RX(eNB,proc_rxtx,no_relay);
 
@@ -1371,10 +1371,10 @@ int main(int argc, char **argv)
 
           //    printf("ulsch_coding: O[%d] %d\n",i,o_flip[i]);
 
-	  
+
 	  //          if (ret <= eNB->ulsch[0]->max_turbo_iterations) {
-	  
-	  if (eNB->ulsch[0]->harq_processes[harq_pid]->status == SCH_IDLE) { 
+
+	  if (eNB->ulsch[0]->harq_processes[harq_pid]->status == SCH_IDLE) {
 
 	    //  avg_iter += ret;
 	    iter_trials++;
@@ -1425,7 +1425,7 @@ int main(int argc, char **argv)
             if (n_frames==1) {
               printf("ULSCH in error in round %d\n",round);
             }
-          }  // ulsch error	  
+          }  // ulsch error
 
         } // round
 
diff --git a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c
index 921ea50bc0..31b0f2fe75 100644
--- a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c
+++ b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c
@@ -17,7 +17,7 @@
  *-------------------------------------------------------------------------------
  * For more information about the OpenAirInterface (OAI) Software Alliance:
  *      contact@openairinterface.org
- */ 
+ */
 
 /*! \file flexran_agent_mac.c
  * \brief FlexRAN agent message handler for MAC layer
@@ -54,7 +54,7 @@ struct lfds700_ringbuffer_element *dl_mac_config_array[NUM_MAX_ENB];
 struct lfds700_ringbuffer_state ringbuffer_state[NUM_MAX_ENB];
 
 
-int flexran_agent_mac_stats_reply(mid_t mod_id,       
+int flexran_agent_mac_stats_reply(mid_t mod_id,
           const report_config_t *report_config,
            Protocol__FlexUeStatsReport **ue_report,
            Protocol__FlexCellStatsReport **cell_report) {
@@ -68,7 +68,7 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
   /* Allocate memory for list of UE reports */
   if (report_config->nr_ue > 0) {
 
-          
+
           for (i = 0; i < report_config->nr_ue; i++) {
 
 
@@ -76,24 +76,24 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
                 /* Check flag for creation of buffer status report */
                 if (report_config->ue_report_type[i].ue_report_flags & PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_BSR) {
                       //TODO should be automated
-                        ue_report[i]->n_bsr = 4; 
+                        ue_report[i]->n_bsr = 4;
                         uint32_t *elem;
                         elem = (uint32_t *) malloc(sizeof(uint32_t)*ue_report[i]->n_bsr);
                         if (elem == NULL)
                                goto error;
                         for (j = 0; j < ue_report[i]->n_bsr; j++) {
-                                // NN: we need to know the cc_id here, consider the first one 
+                                // NN: we need to know the cc_id here, consider the first one
                                 elem[j] = flexran_get_ue_bsr_ul_buffer_info (enb_id, i, j);
                         }
-                          
+
                         ue_report[i]->bsr = elem;
                 }
-                
+
                 /* Check flag for creation of PHR report */
                 if (report_config->ue_report_type[i].ue_report_flags & PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_PHR) {
                         ue_report[i]->phr = flexran_get_ue_phr (enb_id, i); // eNB_UE_list->UE_template[UE_PCCID(enb_id,i)][i].phr_info;
                         ue_report[i]->has_phr = 1;
-                      
+
                 }
 
                 /* Check flag for creation of RLC buffer status report */
@@ -134,19 +134,19 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
                         if (ue_report[i]->n_rlc_report > 0)
                             ue_report[i]->rlc_report = rlc_reports;
 
-                      
+
                 }
 
                 /* Check flag for creation of MAC CE buffer status report */
                 if (report_config->ue_report_type[i].ue_report_flags & PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_MAC_CE_BS) {
                         // TODO: Fill in the actual MAC CE buffer status report
-                        ue_report[i]->pending_mac_ces = (flexran_get_MAC_CE_bitmap_TA(enb_id,i,0) | (0 << 1) | (0 << 2) | (0 << 3)) & 15; 
+                        ue_report[i]->pending_mac_ces = (flexran_get_MAC_CE_bitmap_TA(enb_id,i,0) | (0 << 1) | (0 << 2) | (0 << 3)) & 15;
                                       // Use as bitmap. Set one or more of the; /* Use as bitmap. Set one or more of the
                                        // PROTOCOL__FLEX_CE_TYPE__FLPCET_ values
                                        // found in stats_common.pb-c.h. See
-                                       // flex_ce_type in FlexRAN specification 
+                                       // flex_ce_type in FlexRAN specification
                         ue_report[i]->has_pending_mac_ces = 1;
-                  
+
                 }
 
                 /* Check flag for creation of DL CQI report */
@@ -167,7 +167,7 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
                         Protocol__FlexDlCsi **csi_reports;
                         csi_reports = malloc(sizeof(Protocol__FlexDlCsi *)*dl_report->n_csi_report);
                         if (csi_reports == NULL)
-                          goto error;                    
+                          goto error;
                         for (j = 0; j < dl_report->n_csi_report; j++) {
 
                               csi_reports[j] = malloc(sizeof(Protocol__FlexDlCsi));
@@ -211,18 +211,18 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
                                     if (csi11 == NULL)
                                     goto error;
                                     protocol__flex_csi_p11__init(csi11);
-                                  
-                                    csi11->wb_cqi = malloc(sizeof(csi11->wb_cqi));  
+
+                                    csi11->wb_cqi = malloc(sizeof(csi11->wb_cqi));
 				    csi11->n_wb_cqi = 1;
-				    csi11->wb_cqi[0] = flexran_get_ue_wcqi (enb_id, i);                                       		    
-                                    // According To spec 36.213                                  
-                                     
+				    csi11->wb_cqi[0] = flexran_get_ue_wcqi (enb_id, i);
+                                    // According To spec 36.213
+
                                     if (flexran_get_antenna_ports(enb_id, j) == 2 && csi_reports[j]->ri == 1) {
                                         // TODO PMI
                                         csi11->wb_pmi = flexran_get_ue_wpmi(enb_id, i, 0);
                                         csi11->has_wb_pmi = 1;
 
-                                       }   
+                                       }
 
                                       else if (flexran_get_antenna_ports(enb_id, j) == 2 && csi_reports[j]->ri == 2){
                                         // TODO PMI
@@ -239,14 +239,14 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
 
                                       }
 
-                                      csi11->has_wb_pmi = 0;                                      
+                                      csi11->has_wb_pmi = 0;
 
                                       csi_reports[j]->p11csi = csi11;
 
                                }
 
-                                      
-                                     
+
+
 
 
                               else if(csi_reports[j]->report_case == PROTOCOL__FLEX_DL_CSI__REPORT_P20CSI){
@@ -256,16 +256,16 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
                                     if (csi20 == NULL)
                                     goto error;
                                     protocol__flex_csi_p20__init(csi20);
-                                    
-                                    csi20->wb_cqi = flexran_get_ue_wcqi (enb_id, i);                                       
+
+                                    csi20->wb_cqi = flexran_get_ue_wcqi (enb_id, i);
                                     csi20->has_wb_cqi = 1;
 
-                                      
+
                                     csi20->bandwidth_part_index = 1 ;//TODO
                                     csi20->has_bandwidth_part_index = 1;
 
                                     csi20->sb_index = 1 ;//TODO
-                                    csi20->has_sb_index = 1 ;                                     
+                                    csi20->has_sb_index = 1 ;
 
 
                                     csi_reports[j]->p20csi = csi20;
@@ -280,20 +280,20 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
                                   // if (csi21 == NULL)
                                   // goto error;
                                   // protocol__flex_csi_p21__init(csi21);
-                                
-                                  // csi21->wb_cqi = flexran_get_ue_wcqi (enb_id, i);                                       
-                                  
-                                  
+
+                                  // csi21->wb_cqi = flexran_get_ue_wcqi (enb_id, i);
+
+
                                   // csi21->wb_pmi = flexran_get_ue_pmi(enb_id); //TDO inside
                                   // csi21->has_wb_pmi = 1;
 
-                                  // csi21->sb_cqi = 1; // TODO 
-                                   
+                                  // csi21->sb_cqi = 1; // TODO
+
                                   // csi21->bandwidth_part_index = 1 ; //TDO inside
-                                  // csi21->has_bandwidth_part_index = 1 ;   
+                                  // csi21->has_bandwidth_part_index = 1 ;
 
                                   // csi21->sb_index = 1 ;//TODO
-                                  // csi21->has_sb_index = 1 ;                                     
+                                  // csi21->has_sb_index = 1 ;
 
 
                                   // csi_reports[j]->p20csi = csi21;
@@ -308,10 +308,10 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
                                   // if (csi12 == NULL)
                                   // goto error;
                                   // protocol__flex_csi_a12__init(csi12);
-                                
-                                  // csi12->wb_cqi = flexran_get_ue_wcqi (enb_id, i);                                       
-                                  
-                                  // csi12->sb_pmi = 1 ; //TODO inside                                                                      
+
+                                  // csi12->wb_cqi = flexran_get_ue_wcqi (enb_id, i);
+
+                                  // csi12->sb_pmi = 1 ; //TODO inside
 
                                   // TODO continou
                               }
@@ -323,18 +323,18 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
                                     // if (csi22 == NULL)
                                     // goto error;
                                     // protocol__flex_csi_a22__init(csi22);
-                                  
-                                    // csi22->wb_cqi = flexran_get_ue_wcqi (enb_id, i);                                       
-                                    
-                                    // csi22->sb_cqi = 1 ; //TODO inside                                      
 
-                                    // csi22->wb_pmi = flexran_get_ue_wcqi (enb_id, i);                                       
+                                    // csi22->wb_cqi = flexran_get_ue_wcqi (enb_id, i);
+
+                                    // csi22->sb_cqi = 1 ; //TODO inside
+
+                                    // csi22->wb_pmi = flexran_get_ue_wcqi (enb_id, i);
                                     // csi22->has_wb_pmi = 1;
-                                    
-                                    // csi22->sb_pmi = 1 ; //TODO inside                                                                            
+
+                                    // csi22->sb_pmi = 1 ; //TODO inside
                                     // csi22->has_wb_pmi = 1;
 
-                                    // csi22->sb_list = flexran_get_ue_wcqi (enb_id, i);                                       
+                                    // csi22->sb_list = flexran_get_ue_wcqi (enb_id, i);
 
 
                                 }
@@ -347,10 +347,10 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
                                     // goto error;
                                     // protocol__flex_csi_a20__init(csi20);
 
-                                    // csi20->wb_cqi = flexran_get_ue_wcqi (enb_id, i);                                       
+                                    // csi20->wb_cqi = flexran_get_ue_wcqi (enb_id, i);
                                     // csi20->has_wb_cqi = 1;
 
-                                    // csi20>sb_cqi = 1 ; //TODO inside                                      
+                                    // csi20>sb_cqi = 1 ; //TODO inside
                                     // csi20>has_sb_cqi = 1 ;
 
                                     // csi20->sb_list = 1; // TODO inside
@@ -371,7 +371,7 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
                     dl_report->csi_report = csi_reports;
                     //Add the DL CQI report to the stats report
                      ue_report[i]->dl_cqi_report = dl_report;
-                      
+
                 }
 
                 /* Check flag for creation of paging buffer status report */
@@ -463,7 +463,7 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
                               //TODO: Set the servCellIndex for this report
                               ul_report[j]->serv_cell_index = 0;
                               ul_report[j]->has_serv_cell_index = 1;
-                              
+
                               //Set the list of UL reports of this UE to the full UL report
                               full_ul_report->cqi_meas = ul_report;
 
@@ -487,9 +487,9 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
                           }
                         //  Add full UL CQI report to the UE report
                         ue_report[i]->ul_cqi_report = full_ul_report;
-                      
 
-                     }    
+
+                     }
                       if (report_config->ue_report_type[i].ue_report_flags & PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_MAC_STATS) {
 
                             Protocol__FlexMacStats *macstats;
@@ -497,7 +497,7 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
                             if (macstats == NULL)
                               goto error;
                             protocol__flex_mac_stats__init(macstats);
-                                                   
+
 
                             macstats->total_bytes_sdus_dl = flexran_get_total_size_dl_mac_sdus(mod_id, i, cc_id);
                             macstats->has_total_bytes_sdus_dl = 1;
@@ -508,7 +508,7 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
                             macstats->tbs_dl = flexran_get_TBS_dl(mod_id, i, cc_id);
                             macstats->has_tbs_dl = 1;
 
-                            macstats->tbs_ul = flexran_get_TBS_ul(mod_id, i, cc_id);                            
+                            macstats->tbs_ul = flexran_get_TBS_ul(mod_id, i, cc_id);
                             macstats->has_tbs_ul = 1;
 
                             macstats->prb_retx_dl = flexran_get_num_prb_retx_dl_per_ue(mod_id, i, cc_id);
@@ -556,16 +556,16 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
                             macstats->harq_round = flexran_get_harq_round(mod_id, cc_id, i);
                             macstats->has_harq_round = 1;
 
-                            Protocol__FlexMacSdusDl ** mac_sdus;           
+                            Protocol__FlexMacSdusDl ** mac_sdus;
                             mac_sdus = malloc(sizeof(Protocol__FlexMacSdusDl) * flexran_get_num_mac_sdu_tx(mod_id, i, cc_id));
                             if (mac_sdus == NULL)
                                 goto error;
 
-                            macstats->n_mac_sdus_dl = flexran_get_num_mac_sdu_tx(mod_id, i, cc_id);  
-                             
+                            macstats->n_mac_sdus_dl = flexran_get_num_mac_sdu_tx(mod_id, i, cc_id);
+
                             for (j = 0; j < macstats->n_mac_sdus_dl; j++){
 
-                       
+
                                 mac_sdus[j] = malloc(sizeof(Protocol__FlexMacSdusDl));
                                 protocol__flex_mac_sdus_dl__init(mac_sdus[j]);
 
@@ -577,29 +577,29 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
 
 
                             }
-                            
 
-                            macstats->mac_sdus_dl = mac_sdus; 
-                          
 
-                        ue_report[i]->mac_stats = macstats;    
+                            macstats->mac_sdus_dl = mac_sdus;
+
+
+                        ue_report[i]->mac_stats = macstats;
+
+               }
+
+
+
 
-               } 
-                             
-                 
+             }
 
-                            
-             }       
 
-          
-         
-         
-     } 
+
+
+     }
 
   /* Allocate memory for list of cell reports */
   if (report_config->nr_cc > 0) {
-    
-            
+
+
             // Fill in the Cell reports
             for (i = 0; i < report_config->nr_cc; i++) {
 
@@ -627,10 +627,10 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
                             cell_report[i]->noise_inter_report = ni_report;
                       }
             }
-            
 
-      
-            
+
+
+
   }
 
   return 0;
@@ -835,9 +835,9 @@ int flexran_agent_mac_destroy_sr_info(Protocol__FlexranMessage *msg) {
 int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__FlexranMessage **msg) {
   Protocol__FlexHeader *header = NULL;
   int i, j, UE_id;
-  
+
   int available_harq[NUMBER_OF_UE_MAX];
-  
+
   const int xid = *((int *)params);
 
 
@@ -859,12 +859,12 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle
   }
 
   int ahead_of_time = 0;
-  
+
   frame = (frame_t) flexran_get_current_system_frame_num(mod_id);
   subframe = (sub_frame_t) flexran_get_current_subframe(mod_id);
 
   subframe = ((subframe + ahead_of_time) % 10);
-  
+
   if (subframe < flexran_get_current_subframe(mod_id)) {
     frame = (frame + 1) % 1024;
   }
@@ -887,7 +887,7 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle
       }
     }
   }
-  
+
 
   //  LOG_I(FLEXRAN_AGENT, "Sending subframe trigger for frame %d and subframe %d\n", flexran_get_current_frame(mod_id), (flexran_get_current_subframe(mod_id) + 1) % 10);
 
@@ -920,8 +920,8 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle
       //      uint8_t harq_id;
       //uint8_t harq_status;
       //      flexran_get_harq(mod_id, UE_PCCID(mod_id,i), i, frame, subframe, &harq_id, &harq_status);
-      
-      
+
+
       dl_info[i]->harq_process_id = available_harq[UE_id];
       if (RC.mac && RC.mac[mod_id])
         RC.mac[mod_id]->UE_list.eNB_UE_stats[UE_PCCID(mod_id,i)][UE_id].harq_pid = 0;
@@ -1010,7 +1010,7 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle
     for (i = 0; i < sf_trigger_msg->n_dl_info; i++) {
       free(sf_trigger_msg->dl_info[i]->harq_status);
     }
-    free(sf_trigger_msg->dl_info);    
+    free(sf_trigger_msg->dl_info);
     free(sf_trigger_msg->ul_info);
     free(sf_trigger_msg);
   }
@@ -1184,7 +1184,7 @@ int flexran_agent_mac_destroy_ul_config(Protocol__FlexranMessage *msg) {
   free(msg->ul_mac_config_msg->header);
   for (i = 0; i < msg->ul_mac_config_msg->n_ul_ue_data; i++) {
     // TODO  uplink rlc ...
-    // free(msg->ul_mac_config_msg->dl_ue_data[i]->ce_bitmap); 
+    // free(msg->ul_mac_config_msg->dl_ue_data[i]->ce_bitmap);
   //   for (j = 0; j < msg->ul_mac_config_msg->ul_ue_data[i]->n_rlc_pdu; j++) {
   //     for (k = 0; k <  msg->ul_mac_config_msg->ul_ue_data[i]->rlc_pdu[j]->n_rlc_pdu_tb; k++) {
   // free(msg->ul_mac_config_msg->dl_ue_data[i]->rlc_pdu[j]->rlc_pdu_tb[k]);
@@ -1202,7 +1202,7 @@ int flexran_agent_mac_destroy_ul_config(Protocol__FlexranMessage *msg) {
     // free(msg->ul_mac_config_msg->ul_ue_data[i]);
   }
   free(msg->ul_mac_config_msg->ul_ue_data);
-  
+
   free(msg->ul_mac_config_msg);
   free(msg);
 
@@ -1216,10 +1216,10 @@ int flexran_agent_mac_destroy_ul_config(Protocol__FlexranMessage *msg) {
 void flexran_agent_get_pending_dl_mac_config(mid_t mod_id, Protocol__FlexranMessage **msg) {
 
   struct lfds700_misc_prng_state ls;
-  
+
   LFDS700_MISC_MAKE_VALID_ON_CURRENT_LOGICAL_CORE_INITS_COMPLETED_BEFORE_NOW_ON_ANY_OTHER_LOGICAL_CORE;
   lfds700_misc_prng_init(&ls);
-  
+
   if (lfds700_ringbuffer_read(&ringbuffer_state[mod_id], NULL, (void **) msg, &ls) == 0) {
     *msg = NULL;
   }
@@ -1230,10 +1230,10 @@ int flexran_agent_mac_handle_dl_mac_config(mid_t mod_id, const void *params, Pro
   struct lfds700_misc_prng_state ls;
   enum lfds700_misc_flag overwrite_occurred_flag;
   Protocol__FlexranMessage *overwritten_dl_config;
-   
+
   LFDS700_MISC_MAKE_VALID_ON_CURRENT_LOGICAL_CORE_INITS_COMPLETED_BEFORE_NOW_ON_ANY_OTHER_LOGICAL_CORE;
   lfds700_misc_prng_init(&ls);
-  
+
   lfds700_ringbuffer_write( &ringbuffer_state[mod_id],
 			    NULL,
 			    (void *) params,
@@ -1347,7 +1347,7 @@ int flexran_agent_register_mac_xface(mid_t mod_id, AGENT_MAC_xface *xface) {
   xface->flexran_agent_send_sf_trigger = flexran_agent_send_sf_trigger;
   //xface->flexran_agent_send_update_mac_stats = flexran_agent_send_update_mac_stats;
   xface->flexran_agent_get_pending_dl_mac_config = flexran_agent_get_pending_dl_mac_config;
-  
+
   xface->dl_scheduler_loaded_lib = NULL;
   xface->ul_scheduler_loaded_lib = NULL;
   mac_agent_registered[mod_id] = 1;
diff --git a/openair2/LAYER2/MAC/defs.h b/openair2/LAYER2/MAC/defs.h
index ddb8a6942d..76b2194612 100644
--- a/openair2/LAYER2/MAC/defs.h
+++ b/openair2/LAYER2/MAC/defs.h
@@ -157,13 +157,13 @@
 
 #define U_PLANE_INACTIVITY_VALUE 6000
 
-/* 
- * eNB part 
+/*
+ * eNB part
  */
 
 
-/* 
- * UE/ENB common part 
+/*
+ * UE/ENB common part
  */
 /*!\brief MAC header of Random Access Response for Random access preamble identifier (RAPID) */
 typedef struct {
@@ -448,20 +448,20 @@ typedef struct {
 } eNB_DLSCH_INFO;
 /*! \brief eNB overall statistics */
 typedef struct {
-    /// num BCCH PDU per CC 
+    /// num BCCH PDU per CC
     uint32_t total_num_bcch_pdu;
-    /// BCCH buffer size  
+    /// BCCH buffer size
     uint32_t bcch_buffer;
-    /// total BCCH buffer size  
+    /// total BCCH buffer size
     uint32_t total_bcch_buffer;
     /// BCCH MCS
     uint32_t bcch_mcs;
 
-    /// num CCCH PDU per CC 
+    /// num CCCH PDU per CC
     uint32_t total_num_ccch_pdu;
-    /// BCCH buffer size  
+    /// BCCH buffer size
     uint32_t ccch_buffer;
-    /// total BCCH buffer size  
+    /// total BCCH buffer size
     uint32_t total_ccch_buffer;
     /// BCCH MCS
     uint32_t ccch_mcs;
@@ -562,13 +562,13 @@ typedef struct {
     uint32_t num_retransmission;
     /// instantaneous tx throughput for each TTI
     //  uint32_t tti_throughput[NB_RB_MAX];
-    // Number of received MAC SDU    
+    // Number of received MAC SDU
     uint32_t num_mac_sdu_tx;
     // LCID related to SDU
     unsigned char lcid_sdu[NB_RB_MAX];
     // Length of SDU Got from LC DL
     uint32_t sdu_length_tx[NB_RB_MAX];
- 
+
 
     /// overall
     //
@@ -614,7 +614,7 @@ typedef struct {
 
     ///  uplink transport block size
     uint32_t ulsch_TBS;
-    
+
     uint32_t total_ulsch_TBS;
 
     ///  total rb used for a new uplink transmission
@@ -625,9 +625,9 @@ typedef struct {
     uint32_t rbs_used_retx_rx;
     ///  total rb used for a new uplink transmission
     uint32_t total_rbs_used_rx;
-    /// normalized rx power 
+    /// normalized rx power
     int32_t normalized_rx_power;
-    /// target rx power 
+    /// target rx power
     int32_t target_rx_power;
 
     /// num rx pdu
@@ -754,7 +754,7 @@ typedef struct {
     uint32_t dl_buffer_head_sdu_creation_time[MAX_NUM_LCID];
     /// maximum creation time of the downlink buffer head across all LCID
     uint32_t dl_buffer_head_sdu_creation_time_max;
-    /// a flag indicating that the downlink head SDU is segmented  
+    /// a flag indicating that the downlink head SDU is segmented
     uint8_t dl_buffer_head_sdu_is_segmented[MAX_NUM_LCID];
     /// size of remaining size to send for the downlink head SDU
     uint32_t dl_buffer_head_sdu_remaining_size_to_send[MAX_NUM_LCID];
@@ -949,21 +949,21 @@ typedef struct {
     /// Dedicated information for UEs
     struct PhysicalConfigDedicated
 	*physicalConfigDedicated[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
-    /// DLSCH pdu 
+    /// DLSCH pdu
     DLSCH_PDU DLSCH_pdu[MAX_NUM_CCs][2][NUMBER_OF_UE_MAX];
     /// DCI template and MAC connection parameters for UEs
     UE_TEMPLATE UE_template[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
     /// DCI template and MAC connection for RA processes
     int pCC_id[NUMBER_OF_UE_MAX];
-    /// sorted downlink component carrier for the scheduler 
+    /// sorted downlink component carrier for the scheduler
     int ordered_CCids[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
-    /// number of downlink active component carrier 
+    /// number of downlink active component carrier
     int numactiveCCs[NUMBER_OF_UE_MAX];
-    /// sorted uplink component carrier for the scheduler 
+    /// sorted uplink component carrier for the scheduler
     int ordered_ULCCids[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
-    /// number of uplink active component carrier 
+    /// number of uplink active component carrier
     int numactiveULCCs[NUMBER_OF_UE_MAX];
-    /// number of downlink active component carrier 
+    /// number of downlink active component carrier
     uint8_t dl_CC_bitmap[NUMBER_OF_UE_MAX];
     /// eNB to UE statistics
     eNB_UE_STATS eNB_UE_stats[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
@@ -1089,7 +1089,7 @@ typedef struct eNB_MAC_INST_s {
     nfapi_ul_config_request_t UL_req[MAX_NUM_CCs];
     /// NFAPI "Temporary" UL Config Request Structure, holds future UL_config requests
     nfapi_ul_config_request_t UL_req_tmp[MAX_NUM_CCs][10];
-    /// Preallocated HI_DCI0 pdu list 
+    /// Preallocated HI_DCI0 pdu list
     nfapi_hi_dci0_request_pdu_t
 	hi_dci0_pdu_list[MAX_NUM_CCs][MAX_NUM_HI_DCI0_PDU];
     /// NFAPI HI/DCI0 Config Request Structure
@@ -1112,21 +1112,21 @@ typedef struct eNB_MAC_INST_s {
     /// eNB stats
     eNB_STATS eNB_stats[MAX_NUM_CCs];
     // MAC function execution peformance profiler
-    /// processing time of eNB scheduler 
+    /// processing time of eNB scheduler
     time_stats_t eNB_scheduler;
-    /// processing time of eNB scheduler for SI 
+    /// processing time of eNB scheduler for SI
     time_stats_t schedule_si;
     /// processing time of eNB scheduler for Random access
     time_stats_t schedule_ra;
-    /// processing time of eNB ULSCH scheduler 
+    /// processing time of eNB ULSCH scheduler
     time_stats_t schedule_ulsch;
     /// processing time of eNB DCI generation
     time_stats_t fill_DLSCH_dci;
     /// processing time of eNB MAC preprocessor
     time_stats_t schedule_dlsch_preprocessor;
-    /// processing time of eNB DLSCH scheduler 
+    /// processing time of eNB DLSCH scheduler
     time_stats_t schedule_dlsch;	// include rlc_data_req + MAC header + preprocessor
-    /// processing time of eNB MCH scheduler 
+    /// processing time of eNB MCH scheduler
     time_stats_t schedule_mch;
     /// processing time of eNB ULSCH reception
     time_stats_t rx_ulsch_sdu;	// include rlc_data_ind
@@ -1134,8 +1134,8 @@ typedef struct eNB_MAC_INST_s {
     time_stats_t schedule_pch;
 } eNB_MAC_INST;
 
-/* 
- * UE part 
+/*
+ * UE part
  */
 
 typedef enum {
@@ -1329,24 +1329,24 @@ typedef struct {
     uint8_t msi_status;		// could be an array if there are >1 MCH in one MBSFN area
 #endif
     //#ifdef CBA
-    /// CBA RNTI for each group 
+    /// CBA RNTI for each group
     uint16_t cba_rnti[NUM_MAX_CBA_GROUP];
-    /// last SFN for CBA channel access 
+    /// last SFN for CBA channel access
     uint8_t cba_last_access[NUM_MAX_CBA_GROUP];
     //#endif
-    /// total UE scheduler processing time 
+    /// total UE scheduler processing time
     time_stats_t ue_scheduler;	// total
-    /// UE ULSCH tx  processing time inlcuding RLC interface (rlc_data_req) and mac header generation 
+    /// UE ULSCH tx  processing time inlcuding RLC interface (rlc_data_req) and mac header generation
     time_stats_t tx_ulsch_sdu;
     /// UE DLSCH rx  processing time inlcuding RLC interface (mac_rrc_data_ind or mac_rlc_status_ind+mac_rlc_data_ind) and mac header parser
     time_stats_t rx_dlsch_sdu;
-    /// UE query for MCH subframe processing time 
+    /// UE query for MCH subframe processing time
     time_stats_t ue_query_mch;
-    /// UE MCH rx processing time 
+    /// UE MCH rx processing time
     time_stats_t rx_mch_sdu;
-    /// UE BCCH rx processing time including RLC interface (mac_rrc_data_ind) 
+    /// UE BCCH rx processing time including RLC interface (mac_rrc_data_ind)
     time_stats_t rx_si;
-    /// UE PCCH rx processing time including RLC interface (mac_rrc_data_ind) 
+    /// UE PCCH rx processing time including RLC interface (mac_rrc_data_ind)
     time_stats_t rx_p;
 } UE_MAC_INST;
 /*! \brief ID of the neighboring cells used for HO*/
diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
index 7e6eee0f87..aeaa55a79a 100644
--- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
+++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
@@ -744,7 +744,7 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
 	}
       }
       /* if (continue_flag != 1 */
-      if ((ue_sched_ctl->pre_nb_available_rbs[CC_id] == 0) ||	// no RBs allocated 
+      if ((ue_sched_ctl->pre_nb_available_rbs[CC_id] == 0) ||	// no RBs allocated
 	  CCE_allocation_infeasible(module_idP, CC_id, 1, subframeP,
 				    aggregation, rnti)) {
 	LOG_D(MAC,
@@ -929,7 +929,7 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
 	      dl_req->number_dci++;
 	      dl_req->number_pdu++;
 	      dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
-			  
+
 	      eNB->DL_req[CC_id].sfn_sf = frameP<<4 | subframeP;
 	      eNB->DL_req[CC_id].header.message_id = NFAPI_DL_CONFIG_REQUEST;
 
@@ -1116,7 +1116,7 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
 		TBS - ta_len - header_len_dcch -
 		sdu_length_total - header_len_dtch);
 
-	  if (TBS - ta_len - header_len_dcch - sdu_length_total - header_len_dtch > 0) {	// NN: > 2 ? 
+	  if (TBS - ta_len - header_len_dcch - sdu_length_total - header_len_dtch > 0) {	// NN: > 2 ?
 	    rlc_status = mac_rlc_status_ind(module_idP,
 					    rnti,
 					    module_idP,
@@ -1158,7 +1158,7 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
 		eNB_UE_stats[CC_id][UE_id].num_pdu_tx[lcid]
 		+= 1;
               UE_list->eNB_UE_stats[CC_id][UE_id].lcid_sdu[num_sdus] = lcid;
-              UE_list->eNB_UE_stats[CC_id][UE_id].sdu_length_tx[lcid] = sdu_lengths[num_sdus];           
+              UE_list->eNB_UE_stats[CC_id][UE_id].sdu_length_tx[lcid] = sdu_lengths[num_sdus];
 	      UE_list->
 		eNB_UE_stats[CC_id][UE_id].num_bytes_tx
 		[lcid] += sdu_lengths[num_sdus];
@@ -1180,7 +1180,7 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
 	}
 	if (header_len_dtch == 0)
 	  header_len_dtch_last = 0;
-	// there is at least one SDU 
+	// there is at least one SDU
 	// if (num_sdus > 0 ){
 	if ((sdu_length_total + header_len_dcch +
 	     header_len_dtch) > 0) {
@@ -1193,7 +1193,7 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
 	  if (header_len_dtch == 0) {
 	    header_len_dcch = (header_len_dcch > 0) ? 1 : 0;	//header_len_dcch;  // remove length field
 	  } else {
-	    header_len_dtch_last -= 1;	// now use it to find how many bytes has to be removed for the last MAC SDU 
+	    header_len_dtch_last -= 1;	// now use it to find how many bytes has to be removed for the last MAC SDU
 	    header_len_dtch = (header_len_dtch > 0) ? header_len_dtch - header_len_dtch_last : header_len_dtch;	// remove length field for the last SDU
 	  }
 
@@ -1413,10 +1413,10 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
 		    tpc, tpc_accumulated,
 		    normalized_rx_power, target_rx_power);
 
-	    }	// Po_PUCCH has been updated 
+	    }	// Po_PUCCH has been updated
 	    else {
 	      tpc = 1;	//0
-	    }	// time to do TPC update 
+	    }	// time to do TPC update
 	  else {
 	    tpc = 1;	//0
 	  }
@@ -1515,7 +1515,7 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
 							  UE_list.DLSCH_pdu[CC_id][0][(unsigned char)
 										      UE_id].payload
 							  [0]);
-	    
+
 	    LOG_D(MAC,
 		  "Filled NFAPI configuration for DCI/DLSCH/TXREQ %d, new SDU\n",
 		  eNB->pdu_index[CC_id]);
@@ -1695,9 +1695,9 @@ update_ul_dci(module_id_t module_idP,
   int i;
 
 
-  if (cc->tdd_Config != NULL) {	// TDD 
+  if (cc->tdd_Config != NULL) {	// TDD
     for (i = 0;
-	 i <HI_DCI0_req->hi_dci0_request_body.number_of_dci + HI_DCI0_req->hi_dci0_request_body.number_of_dci; 
+	 i <HI_DCI0_req->hi_dci0_request_body.number_of_dci + HI_DCI0_req->hi_dci0_request_body.number_of_dci;
 	 i++) {
 
       if ((hi_dci0_pdu[i].pdu_type == NFAPI_HI_DCI0_DCI_PDU_TYPE) &&
-- 
GitLab