From 321d69f4fd8b50a453a017d4e1825ba54a2fd467 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Fri, 24 Apr 2020 22:47:05 +0200 Subject: lc15: Fix returning values on void function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes following warnings: /osmo-bts/src/osmo-bts-litecell15/l1_if.c:1722:36: warning: assignment to ‘void (*)(void *)’ from incompatible pointer type ‘int (*)(void *)’ [-Wincompatible-pointer-types] 1722 | fl1h->hw_alive.dsp_alive_timer.cb = dsp_alive_timer_cb; | ^ Change-Id: I7a944c0636933c0389db9aabd8b5e6c173052f12 --- src/osmo-bts-litecell15/l1_if.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/osmo-bts-litecell15') diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index 6dead92d..0e334d25 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -1618,7 +1618,7 @@ static void dsp_alive_compl_cb(struct gsm_bts_trx *trx, struct msgb *resp, void msgb_free(resp); } -static int dsp_alive_timer_cb(void *data) +static void dsp_alive_timer_cb(void *data) { struct lc15l1_hdl *fl1h = data; struct gsm_bts_trx *trx = fl1h->phy_inst->trx; @@ -1643,14 +1643,14 @@ static int dsp_alive_timer_cb(void *data) rc = l1if_req_compl(fl1h, msg, dsp_alive_compl_cb, NULL); if (rc < 0) { LOGP(DL1C, LOGL_FATAL, "Failed to send %s primitive\n", get_value_string(lc15bts_sysprim_names, sys_prim->id)); - return -EIO; + return; } /* restart timer */ fl1h->hw_alive.dsp_alive_cnt = 0; osmo_timer_schedule(&fl1h->hw_alive.dsp_alive_timer, fl1h->hw_alive.dsp_alive_period, 0); - return 0; + return; } #endif @@ -1719,8 +1719,7 @@ int bts_model_phy_link_open(struct phy_link *plink) } /* initialize DSP heart beat alive timer */ - fl1h->hw_alive.dsp_alive_timer.cb = dsp_alive_timer_cb; - fl1h->hw_alive.dsp_alive_timer.data = fl1h; + osmo_timer_setup(&fl1h->hw_alive.dsp_alive_timer, dsp_alive_timer_cb, fl1h); fl1h->hw_alive.dsp_alive_cnt = 0; fl1h->hw_alive.dsp_alive_period = pinst->u.lc15.dsp_alive_period; osmo_timer_schedule(&fl1h->hw_alive.dsp_alive_timer, fl1h->hw_alive.dsp_alive_period, 0); -- cgit v1.2.3