summaryrefslogtreecommitdiff
path: root/drivers/rilmodem
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2016-03-31 09:59:47 -0500
committerDenis Kenzior <denkenz@gmail.com>2016-03-31 09:59:47 -0500
commita259c5439aaf2c98c959e0af14522eb084de4662 (patch)
tree6ddafabd59e812cbd3f6d4e90fe62ed2394723f3 /drivers/rilmodem
parent6d975285927b73f4e2cba884663ac7a8daba58a1 (diff)
downloadofono-a259c5439aaf2c98c959e0af14522eb084de4662.tar.gz
rilmodem: Fix minor style issues
Diffstat (limited to 'drivers/rilmodem')
-rw-r--r--drivers/rilmodem/netmon.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/drivers/rilmodem/netmon.c b/drivers/rilmodem/netmon.c
index 5cdfa5e1..f7f7c28c 100644
--- a/drivers/rilmodem/netmon.c
+++ b/drivers/rilmodem/netmon.c
@@ -125,7 +125,7 @@ static void ril_netmon_update_cb(struct ril_msg *message, gpointer user_data)
registered = parcel_r_int32(&rilp);
- /* skipping timeStampType in Ril cell info which is not needed */
+ /* skipping unneeded timeStampType in Ril cell info */
(void)parcel_r_int32(&rilp);
/*skipping timeStamp which is a uint64_t type */
@@ -143,7 +143,6 @@ static void ril_netmon_update_cb(struct ril_msg *message, gpointer user_data)
for (j = 0; j < skip_len; j++)
(void)parcel_r_int32(&rilp);
-
}
if (!registered)
@@ -168,14 +167,12 @@ static void ril_netmon_update_cb(struct ril_msg *message, gpointer user_data)
strcpy(s_mnc, "");
lac = (lac >= 0 && lac <= 65535) ? lac : -1;
-
cid = (cid >= 0 && cid <= 65535) ? cid : -1;
-
rssi = (rssi >= 0 && rssi <= 31) ? rssi : -1;
-
ber = (ber >= 0 && ber <= 7) ? ber : -1;
- ofono_netmon_serving_cell_notify(netmon, OFONO_NETMON_CELL_TYPE_GSM,
+ ofono_netmon_serving_cell_notify(netmon,
+ OFONO_NETMON_CELL_TYPE_GSM,
OFONO_NETMON_INFO_MCC, s_mcc,
OFONO_NETMON_INFO_MNC, s_mnc,
OFONO_NETMON_INFO_LAC, lac,
@@ -183,7 +180,6 @@ static void ril_netmon_update_cb(struct ril_msg *message, gpointer user_data)
OFONO_NETMON_INFO_RSSI, rssi,
OFONO_NETMON_INFO_BER, ber,
OFONO_NETMON_INFO_INVALID);
-
} else if (cell_type == NETMON_RIL_CELLINFO_TYPE_UMTS) {
mcc = parcel_r_int32(&rilp);
mnc = parcel_r_int32(&rilp);
@@ -204,16 +200,13 @@ static void ril_netmon_update_cb(struct ril_msg *message, gpointer user_data)
strcpy(s_mnc, "");
lac = (lac >= 0 && lac <= 65535) ? lac : -1;
-
cid = (cid >= 0 && cid <= 268435455) ? cid : -1;
-
psc = (psc >= 0 && rssi <= 511) ? psc : -1;
-
rssi = (rssi >= 0 && rssi <= 31) ? rssi : -1;
-
ber = (ber >= 0 && ber <= 7) ? ber : -1;
- ofono_netmon_serving_cell_notify(netmon, OFONO_NETMON_CELL_TYPE_UMTS,
+ ofono_netmon_serving_cell_notify(netmon,
+ OFONO_NETMON_CELL_TYPE_UMTS,
OFONO_NETMON_INFO_MCC, s_mcc,
OFONO_NETMON_INFO_MNC, s_mnc,
OFONO_NETMON_INFO_LAC, lac,
@@ -232,14 +225,12 @@ static void ril_netmon_update_cb(struct ril_msg *message, gpointer user_data)
error:
CALLBACK_WITH_FAILURE(cb, cbd->data);
- return;
}
static int ril_netmon_probe(struct ofono_netmon *netmon,
unsigned int vendor, void *user)
{
GRil *ril = user;
-
struct netmon_data *ud = g_new0(struct netmon_data, 1);
ud->ril = g_ril_clone(ril);
@@ -256,7 +247,6 @@ static void ril_netmon_remove(struct ofono_netmon *netmon)
struct netmon_data *nmd = ofono_netmon_get_data(netmon);
ofono_netmon_set_data(netmon, NULL);
-
g_ril_unref(nmd->ril);
}