aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/vt6656/card.c
diff options
context:
space:
mode:
authorElise Lennion <elise.lennion@gmail.com>2016-10-17 00:18:58 -0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-10-17 10:27:55 +0200
commitce439c425b4e3f93e366939837127fcfd7d013e2 (patch)
tree31bcaf8f042a5b388703a3334bdd81c1dbdff86e /drivers/staging/vt6656/card.c
parentStaging: unisys: visorbus: Make a read-only structure (diff)
downloadlinux-dev-ce439c425b4e3f93e366939837127fcfd7d013e2.tar.xz
linux-dev-ce439c425b4e3f93e366939837127fcfd7d013e2.zip
staging: vt6656: Compress return logic into one line.
Compress the return logic into one line avoids unnecessary variable declarations. In this case it also makes it easier to understand the function. Coccinelle was used to find this return statement. However, additional compressions were done to make the function clearer. Semantic patch: @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Elise Lennion <elise.lennion@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6656/card.c')
-rw-r--r--drivers/staging/vt6656/card.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
index 807d3f7af58d..0e5a99375099 100644
--- a/drivers/staging/vt6656/card.c
+++ b/drivers/staging/vt6656/card.c
@@ -501,16 +501,7 @@ u8 vnt_get_pkt_type(struct vnt_private *priv)
*/
u64 vnt_get_tsf_offset(u8 rx_rate, u64 tsf1, u64 tsf2)
{
- u64 tsf_offset = 0;
- u16 rx_bcn_offset;
-
- rx_bcn_offset = cw_rxbcntsf_off[rx_rate % MAX_RATE];
-
- tsf2 += (u64)rx_bcn_offset;
-
- tsf_offset = tsf1 - tsf2;
-
- return tsf_offset;
+ return tsf1 - tsf2 - (u64)cw_rxbcntsf_off[rx_rate % MAX_RATE];
}
/*