aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-12-28 11:11:17 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-12-28 11:11:17 +0100
commit9c279945a18a14e1cc2614fc0f6b94937b909889 (patch)
treeca242307b81f969966e72ffbedadef9bf44f3e7f
parent19e87d332f47acfa98f5c4a6646b3336008e45e7 (diff)
misc: Avoid using double numbers on our ARM
In the perf the ARM EABI ddiv operation showed up in the most of expensive symbols. It doesn't really make much sense as the calls should only be done on configuration.
-rw-r--r--src/osmo-bts-sysmo/eeprom.c8
-rw-r--r--src/osmo-bts-sysmo/sysmobts_vty.c4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/osmo-bts-sysmo/eeprom.c b/src/osmo-bts-sysmo/eeprom.c
index 77ddfff3..7b579cd6 100644
--- a/src/osmo-bts-sysmo/eeprom.c
+++ b/src/osmo-bts-sysmo/eeprom.c
@@ -1012,21 +1012,21 @@ eeprom_Error_t eeprom_ReadRxCal( int iBand, int iUplink, eeprom_RxCal_t *pRxCal
}
// Expand the External RX gain
- pRxCal->fExtRxGain = (float)pCfgRxCal->sfixExtRxGain * 0.001953125;
+ pRxCal->fExtRxGain = (float)pCfgRxCal->sfixExtRxGain * 0.001953125f;
// Expand the Mixer gain error compensation
- pRxCal->fRxMixGainCorr = (float)pCfgRxCal->sfixRxMixGainCorr * 0.001953125;
+ pRxCal->fRxMixGainCorr = (float)pCfgRxCal->sfixRxMixGainCorr * 0.001953125f;
// Expand the LNA gain error compensation (1:@-12 dB, 2:@-24 dB, 3:@-36 dB)
for ( i = 0; i < 3; i++ )
{
- pRxCal->fRxLnaGainCorr[i] = (float)pCfgRxCal->sfixRxLnaGainCorr[i] * 0.001953125;
+ pRxCal->fRxLnaGainCorr[i] = (float)pCfgRxCal->sfixRxLnaGainCorr[i] * 0.001953125f;
}
// Expand the Frequency roll-off compensation
for ( i = 0; i < nArfcn; i++ )
{
- pRxCal->fRxRollOffCorr[i] = (float)pCfgRxCal->sfixRxRollOffCorr[i] * 0.001953125;
+ pRxCal->fRxRollOffCorr[i] = (float)pCfgRxCal->sfixRxRollOffCorr[i] * 0.001953125f;
}
break;
}
diff --git a/src/osmo-bts-sysmo/sysmobts_vty.c b/src/osmo-bts-sysmo/sysmobts_vty.c
index cd51a962..06b288bd 100644
--- a/src/osmo-bts-sysmo/sysmobts_vty.c
+++ b/src/osmo-bts-sysmo/sysmobts_vty.c
@@ -224,7 +224,7 @@ DEFUN(cfg_trx_min_qual_rach, cfg_trx_min_qual_rach_cmd,
struct gsm_bts_trx *trx = vty->index;
struct femtol1_hdl *fl1h = trx_femtol1_hdl(trx);
- fl1h->min_qual_rach = atof(argv[0]) / 10.0f;
+ fl1h->min_qual_rach = strtof(argv[0], NULL) / 10.0f;
return CMD_SUCCESS;
}
@@ -237,7 +237,7 @@ DEFUN(cfg_trx_min_qual_norm, cfg_trx_min_qual_norm_cmd,
struct gsm_bts_trx *trx = vty->index;
struct femtol1_hdl *fl1h = trx_femtol1_hdl(trx);
- fl1h->min_qual_norm = atof(argv[0]) / 10.0f;
+ fl1h->min_qual_norm = strtof(argv[0], NULL) / 10.0f;
return CMD_SUCCESS;
}