From 8dbacacd37e2d4810c8e0ff2008c94cc6ded0b13 Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Thu, 2 Nov 2017 17:40:08 +0700 Subject: [PATCH] mobile: get rid of unused variables / functions Change-Id: Id867ffed9b2b67025320d002e1e009e19c759a23 --- src/host/layer23/src/mobile/gsm411_sms.c | 4 +-- src/host/layer23/src/mobile/gsm48_mm.c | 9 ++----- src/host/layer23/src/mobile/gsm48_rr.c | 34 +++++++++++------------- 3 files changed, 19 insertions(+), 28 deletions(-) diff --git a/src/host/layer23/src/mobile/gsm411_sms.c b/src/host/layer23/src/mobile/gsm411_sms.c index f56262e5c..22db8590a 100644 --- a/src/host/layer23/src/mobile/gsm411_sms.c +++ b/src/host/layer23/src/mobile/gsm411_sms.c @@ -226,7 +226,7 @@ static int gsm340_rx_tpdu(struct gsm_trans *trans, struct msgb *msg) uint8_t *smsp = msgb_sms(msg); struct gsm_sms *gsms; unsigned int sms_alphabet; - uint8_t sms_mti, sms_mms; + uint8_t sms_mti; uint8_t oa_len_bytes; uint8_t address_lv[12]; /* according to 03.40 / 9.1.2.5 */ int rc = 0; @@ -235,7 +235,7 @@ static int gsm340_rx_tpdu(struct gsm_trans *trans, struct msgb *msg) /* invert those fields where 0 means active/present */ sms_mti = *smsp & 0x03; - sms_mms = !!(*smsp & 0x04); + /* uint8_t sms_mms = !!(*smsp & 0x04); */ gsms->status_rep_req = (*smsp & 0x20); gsms->ud_hdr_ind = (*smsp & 0x40); gsms->reply_path_req = (*smsp & 0x80); diff --git a/src/host/layer23/src/mobile/gsm48_mm.c b/src/host/layer23/src/mobile/gsm48_mm.c index 360f9b32f..4b1db1e52 100644 --- a/src/host/layer23/src/mobile/gsm48_mm.c +++ b/src/host/layer23/src/mobile/gsm48_mm.c @@ -3244,7 +3244,6 @@ static int gsm48_mm_conn_go_dedic(struct osmocom_ms *ms) struct gsm48_mmlayer *mm = &ms->mmlayer; struct gsm48_mm_conn *conn, *conn_found = NULL; struct msgb *nmsg; - struct gsm48_mmxx_hdr *nmmh; /* the first and only pending connection is the recent requested */ llist_for_each_entry(conn, &mm->mm_conn, list) { @@ -3293,7 +3292,7 @@ static int gsm48_mm_conn_go_dedic(struct osmocom_ms *ms) } if (!nmsg) return -ENOMEM; - nmmh = (struct gsm48_mmxx_hdr *)nmsg->data; + gsm48_mmxx_upmsg(ms, nmsg); return 0; @@ -3325,7 +3324,6 @@ static int gsm48_mm_sync_ind_active(struct osmocom_ms *ms, struct msgb *msg) struct gsm48_mmlayer *mm = &ms->mmlayer; struct gsm48_mm_conn *conn; struct msgb *nmsg; - struct gsm48_mmxx_hdr *nmmh; /* stop MM connection timer */ stop_mm_t3230(mm); @@ -3342,7 +3340,7 @@ static int gsm48_mm_sync_ind_active(struct osmocom_ms *ms, struct msgb *msg) } if (!nmsg) continue; /* skip if not of CC type */ - nmmh = (struct gsm48_mmxx_hdr *)nmsg->data; + /* copy L3 message */ nmsg->l3h = msgb_put(nmsg, msgb_l3len(msg)); memcpy(nmsg->l3h, msg->l3h, msgb_l3len(msg)); @@ -3595,15 +3593,12 @@ static int gsm48_rcv_rr_sapi3(struct osmocom_ms *ms, struct msgb *msg, llist_for_each_entry(conn, &mm->mm_conn, list) { if (conn->sapi == sapi && conn->state == GSM48_MMXX_ST_DEDICATED) { - struct gsm48_mmxx_hdr *nmmh; struct msgb *nmsg; - nmsg = gsm48_mmxx_msgb_alloc( GSM48_MMSMS_EST_CNF, conn->ref, conn->transaction_id, conn->sapi); if (!nmsg) return -ENOMEM; - nmmh = (struct gsm48_mmxx_hdr *)nmsg->data; gsm48_mmxx_upmsg(ms, nmsg); } } diff --git a/src/host/layer23/src/mobile/gsm48_rr.c b/src/host/layer23/src/mobile/gsm48_rr.c index b821457a6..ac272143d 100644 --- a/src/host/layer23/src/mobile/gsm48_rr.c +++ b/src/host/layer23/src/mobile/gsm48_rr.c @@ -743,11 +743,6 @@ static void timeout_rr_t3122(void *arg) LOGP(DRR, LOGL_INFO, "timer T3122 has fired\n"); } -static void timeout_rr_t3124(void *arg) -{ - LOGP(DRR, LOGL_INFO, "timer T3124 has fired\n"); -} - static void timeout_rr_t3126(void *arg) { struct gsm48_rrlayer *rr = arg; @@ -812,15 +807,6 @@ static void start_rr_t3122(struct gsm48_rrlayer *rr, int sec, int micro) osmo_timer_schedule(&rr->t3122, sec, micro); } -static void start_rr_t3124(struct gsm48_rrlayer *rr, int sec, int micro) -{ - LOGP(DRR, LOGL_INFO, "starting T3124 with %d.%03d seconds\n", sec, - micro / 1000); - rr->t3124.cb = timeout_rr_t3124; - rr->t3124.data = rr; - osmo_timer_schedule(&rr->t3124, sec, micro); -} - static void start_rr_t3126(struct gsm48_rrlayer *rr, int sec, int micro) { LOGP(DRR, LOGL_INFO, "starting T3126 with %d.%03d seconds\n", sec, @@ -2735,7 +2721,7 @@ static int gsm48_rr_tx_meas_rep(struct osmocom_ms *ms) uint8_t serv_rxlev_full = 0, serv_rxlev_sub = 0, serv_rxqual_full = 0, serv_rxqual_sub = 0; uint8_t ta, tx_power; - uint8_t rep_ba = 0, rep_valid = 0, meas_valid = 0, multi_rep = 0; + uint8_t rep_ba = 0, rep_valid = 0, meas_valid = 0; uint8_t n = 0, rxlev_nc[6], bsic_nc[6], bcch_f_nc[6]; /* just in case! */ @@ -2770,12 +2756,13 @@ static int gsm48_rr_tx_meas_rep(struct osmocom_ms *ms) uint8_t ncc; int i, index; - /* multiband reporting, if not: 0 = normal reporting */ - if (s->si5ter) - multi_rep = s->nb_multi_rep_si5ter; +#if 0 + /* FIXME: multi-band reporting, if not: 0 = normal reporting */ + uint8_t multi_rep = s->si5ter ? + s->nb_multi_rep_si5ter : 0; +#endif /* get 6 strongest measurements */ - // FIXME: multiband report strongest = 127; /* infinite */ for (n = 0; n < 6; n++) { current = -128; /* -infinite */ @@ -5579,6 +5566,15 @@ static void timeout_rr_t3124(void *arg) todo } +static void start_rr_t3124(struct gsm48_rrlayer *rr, int sec, int micro) +{ + LOGP(DRR, LOGL_INFO, "starting T3124 with %d.%03d seconds\n", sec, + micro / 1000); + rr->t3124.cb = timeout_rr_t3124; + rr->t3124.data = rr; + osmo_timer_schedule(&rr->t3124, sec, micro); +} + /* send HANDOVER ACCESS burst (9.1.14) */ static int gsm48_rr_tx_hando_access(struct osmocom_ms *ms) {