This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Minh-Quang Nguyen gerrit-no-reply at lists.osmocom.orgReview at https://gerrit.osmocom.org/273 LC15: Fix coding style Change-Id: Icb8100eb9a3f89f2f6dfdcc7d5b33efab48e7860 --- M src/osmo-bts-litecell15/calib_file.c 1 file changed, 35 insertions(+), 35 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/73/273/1 diff --git a/src/osmo-bts-litecell15/calib_file.c b/src/osmo-bts-litecell15/calib_file.c index 857e6d0..ccb4629 100644 --- a/src/osmo-bts-litecell15/calib_file.c +++ b/src/osmo-bts-litecell15/calib_file.c @@ -43,10 +43,10 @@ #include "utils.h" #include "osmo-bts/oml.h" -/** - * * Maximum calibration data chunk size - * */ + +/* Maximum calibration data chunk size */ #define MAX_CALIB_TBL_SIZE 65536 +/* Calibration header version */ #define CALIB_HDR_V1 0x01 struct calib_file_desc { @@ -362,25 +362,25 @@ char calChkSum ; - //calculate file size in bytes + /* calculate file size in bytes */ fseek(st->fp, 0L, SEEK_END); sz = ftell(st->fp); - //rewind read poiner + /* rewind read poiner */ fseek(st->fp, 0L, SEEK_SET); - //read file + /* read file */ rbuf = (char *) malloc( sizeof(char) * sz ); rc = fread(rbuf, 1, sizeof(char) * sz, st->fp); - if ( rc != sz) { + if (rc != sz) { LOGP(DL1C, LOGL_ERROR, "%s reading error\n", desc->fname); free(rbuf); - //close file + /* close file */ rc = calib_file_close(fl1h); - if (rc < 0 ) { + if (rc < 0) { LOGP(DL1C, LOGL_ERROR, "%s can not close\n", desc->fname); return rc; } @@ -390,32 +390,32 @@ calTbl = (struct calTbl_t*) rbuf; - //calcualte file checksum + /* calcualte file checksum */ calChkSum = 0; - while ( sz-- ) { + while (sz--) { calChkSum ^= rbuf[sz]; } - //validate Tx calibration parity - if ( calChkSum ) { + /* validate Tx calibration parity */ + if (calChkSum) { LOGP(DL1C, LOGL_ERROR, "%s has invalid checksum %x.\n", desc->fname, calChkSum); return -4; } - //validate Tx calibration header - if ( calTbl->hdr.v1.u8Version != CALIB_HDR_V1 ) { + /* validate Tx calibration header */ + if (calTbl->hdr.v1.u8Version != CALIB_HDR_V1) { LOGP(DL1C, LOGL_ERROR, "%s has invalid header version %u.\n", desc->fname, calTbl->hdr.v1.u8Version); return -5; } - //validate calibration description - if ( calTbl->hdr.v1.toc.u32DescOfst == 0xFFFFFFFF ) { + /* validate calibration description */ + if (calTbl->hdr.v1.toc.u32DescOfst == 0xFFFFFFFF) { LOGP(DL1C, LOGL_ERROR, "%s has invalid calibration description offset.\n", desc->fname); return -6; } - //validate calibration date - if ( calTbl->hdr.v1.toc.u32DateOfst == 0xFFFFFFFF ) { + /* validate calibration date */ + if (calTbl->hdr.v1.toc.u32DateOfst == 0xFFFFFFFF) { LOGP(DL1C, LOGL_ERROR, "%s has invalid calibration date offset.\n", desc->fname); return -7; } @@ -424,37 +424,37 @@ desc->fname, calTbl->u8RawData + calTbl->hdr.v1.toc.u32DateOfst); - //validate calibration station - if ( calTbl->hdr.v1.toc.u32StationOfst == 0xFFFFFFFF ) { + /* validate calibration station */ + if (calTbl->hdr.v1.toc.u32StationOfst == 0xFFFFFFFF) { LOGP(DL1C, LOGL_ERROR, "%s has invalid calibration station ID offset.\n", desc->fname); return -8; } - //validate FPGA FW version - if ( calTbl->hdr.v1.toc.u32FpgaFwVerOfst == 0xFFFFFFFF ) { + /* validate FPGA FW version */ + if (calTbl->hdr.v1.toc.u32FpgaFwVerOfst == 0xFFFFFFFF) { LOGP(DL1C, LOGL_ERROR, "%s has invalid FPGA FW version offset.\n", desc->fname); return -9; } - //validate DSP FW version - if ( calTbl->hdr.v1.toc.u32DspFwVerOfst == 0xFFFFFFFF ) { + /* validate DSP FW version */ + if (calTbl->hdr.v1.toc.u32DspFwVerOfst == 0xFFFFFFFF) { LOGP(DL1C, LOGL_ERROR, "%s has invalid DSP FW version offset.\n", desc->fname); return -10; } - //validate Tx calibration data offset - if ( calTbl->hdr.v1.toc.u32DataOfst == 0xFFFFFFFF ) { + /* validate Tx calibration data offset */ + if (calTbl->hdr.v1.toc.u32DataOfst == 0xFFFFFFFF) { LOGP(DL1C, LOGL_ERROR, "%s has invalid calibration data offset.\n", desc->fname); return -11; } - if ( !desc->rx ) { + if (!desc->rx) { - //parse min/max Tx power + /* parse min/max Tx power */ fl1h->phy_inst->u.lc15.minTxPower = calTbl->u8RawData[calTbl->hdr.v1.toc.u32DataOfst + (5 << 2)]; fl1h->phy_inst->u.lc15.maxTxPower = calTbl->u8RawData[calTbl->hdr.v1.toc.u32DataOfst + (6 << 2)]; - //override nominal Tx power of given TRX if needed - if ( fl1h->phy_inst->trx->nominal_power > fl1h->phy_inst->u.lc15.maxTxPower) { + /* override nominal Tx power of given TRX if needed */ + if (fl1h->phy_inst->trx->nominal_power > fl1h->phy_inst->u.lc15.maxTxPower) { LOGP(DL1C, LOGL_INFO, "Set TRX %u nominal Tx power to %d dBm (%d)\n", plink->num, fl1h->phy_inst->u.lc15.maxTxPower, @@ -463,7 +463,7 @@ fl1h->phy_inst->trx->nominal_power = fl1h->phy_inst->u.lc15.maxTxPower; } - if ( fl1h->phy_inst->trx->nominal_power < fl1h->phy_inst->u.lc15.minTxPower) { + if (fl1h->phy_inst->trx->nominal_power < fl1h->phy_inst->u.lc15.minTxPower) { LOGP(DL1C, LOGL_INFO, "Set TRX %u nominal Tx power to %d dBm (%d)\n", plink->num, fl1h->phy_inst->u.lc15.minTxPower, @@ -472,7 +472,7 @@ fl1h->phy_inst->trx->nominal_power = fl1h->phy_inst->u.lc15.minTxPower; } - if ( fl1h->phy_inst->trx->power_params.trx_p_max_out_mdBm > to_mdB(fl1h->phy_inst->u.lc15.maxTxPower) ) { + if (fl1h->phy_inst->trx->power_params.trx_p_max_out_mdBm > to_mdB(fl1h->phy_inst->u.lc15.maxTxPower)) { LOGP(DL1C, LOGL_INFO, "Set TRX %u Tx power parameter to %d dBm (%d)\n", plink->num, to_mdB(fl1h->phy_inst->u.lc15.maxTxPower), @@ -481,7 +481,7 @@ fl1h->phy_inst->trx->power_params.trx_p_max_out_mdBm = to_mdB(fl1h->phy_inst->u.lc15.maxTxPower); } - if ( fl1h->phy_inst->trx->power_params.trx_p_max_out_mdBm < to_mdB(fl1h->phy_inst->u.lc15.minTxPower) ) { + if (fl1h->phy_inst->trx->power_params.trx_p_max_out_mdBm < to_mdB(fl1h->phy_inst->u.lc15.minTxPower)) { LOGP(DL1C, LOGL_INFO, "Set TRX %u Tx power parameter to %d dBm (%d)\n", plink->num, to_mdB(fl1h->phy_inst->u.lc15.minTxPower), @@ -496,7 +496,7 @@ fl1h->phy_inst->u.lc15.maxTxPower ); } - //rewind read poiner for subsequence tasks + /* rewind read pointer for subsequence tasks */ fseek(st->fp, 0L, SEEK_SET); free(rbuf); -- To view, visit https://gerrit.osmocom.org/273 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icb8100eb9a3f89f2f6dfdcc7d5b33efab48e7860 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen <minh-quang.nguyen at nutaq.com>