From: Arushi Singhal <arushisinghal19971997@gmail.com>
To: pure.logic@nexus-software.ie
Cc: Johan Hovold <johan@kernel.org>, Alex Elder <elder@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
greybus-dev@lists.linaro.org, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org, outreachy-kernel@googlegroups.com
Subject: [PATCH] staging: greybus: compress return logic
Date: Sat, 25 Mar 2017 10:50:07 +0530 [thread overview]
Message-ID: <20170325052007.GA4908@arushi-HP-Pavilion-Notebook> (raw)
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
next reply other threads:[~2017-03-25 5:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-25 5:20 Arushi Singhal [this message]
2017-04-10 4:45 ` [greybus-dev] " Viresh Kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170325052007.GA4908@arushi-HP-Pavilion-Notebook \
--to=arushisinghal19971997@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=elder@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=greybus-dev@lists.linaro.org \
--cc=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=outreachy-kernel@googlegroups.com \
--cc=pure.logic@nexus-software.ie \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome