Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1609091 > unrolled thread

[PATCH] staging: greybus: compress return logic

Started byArushi Singhal <arushisinghal19971997@gmail.com>
First post2017-03-25 06:30 +0100
Last post2017-03-25 06:30 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] staging: greybus: compress return logic Arushi Singhal <arushisinghal19971997@gmail.com> - 2017-03-25 06:30 +0100

#1609091 — [PATCH] staging: greybus: compress return logic

FromArushi Singhal <arushisinghal19971997@gmail.com>
Date2017-03-25 06:30 +0100
Subject[PATCH] staging: greybus: compress return logic
Message-ID<toMqZ-4Ei-1@gated-at.bofh.it>
Simplify function returns by merging assignment and return.

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
---
 drivers/staging/greybus/loopback.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/staging/greybus/loopback.c b/drivers/staging/greybus/loopback.c
index aaf29a5fac83..08e255884206 100644
--- a/drivers/staging/greybus/loopback.c
+++ b/drivers/staging/greybus/loopback.c
@@ -365,11 +365,8 @@ static void gb_loopback_calculate_stats(struct gb_loopback *gb, bool error);
 
 static u32 gb_loopback_nsec_to_usec_latency(u64 elapsed_nsecs)
 {
-	u32 lat;
-
 	do_div(elapsed_nsecs, NSEC_PER_USEC);
-	lat = elapsed_nsecs;
-	return lat;
+	return elapsed_nsecs;
 }
 
 static u64 __gb_loopback_calc_latency(u64 t1, u64 t2)
-- 
2.11.0

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web