Change in osmo-bts[master]: lc15: Fix returning values on void function

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/.

pespin gerrit-no-reply at lists.osmocom.org
Fri Apr 24 20:59:46 UTC 2020


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/17936 )


Change subject: lc15: Fix returning values on void function
......................................................................

lc15: Fix returning values on void function

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
---
M src/osmo-bts-litecell15/l1_if.c
1 file changed, 4 insertions(+), 5 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/36/17936/1

diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c
index 6dead92..0e334d2 100644
--- a/src/osmo-bts-litecell15/l1_if.c
+++ b/src/osmo-bts-litecell15/l1_if.c
@@ -1618,7 +1618,7 @@
 	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 @@
 	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 @@
 	}
 
 	/* 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);

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17936
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I7a944c0636933c0389db9aabd8b5e6c173052f12
Gerrit-Change-Number: 17936
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200424/f79ba417/attachment.htm>


More information about the gerrit-log mailing list