[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170410044511.GA4377@vireshk-i7>
Date: Mon, 10 Apr 2017 10:15:11 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Arushi Singhal <arushisinghal19971997@...il.com>
Cc: pure.logic@...us-software.ie, devel@...verdev.osuosl.org,
Alex Elder <elder@...nel.org>,
outreachy-kernel@...glegroups.com, Johan Hovold <johan@...nel.org>,
linux-kernel@...r.kernel.org, greybus-dev@...ts.linaro.org
Subject: Re: [greybus-dev] [PATCH] staging: greybus: compress return logic
On 25-03-17, 10:50, Arushi Singhal wrote:
> Simplify function returns by merging assignment and return.
>
> Signed-off-by: Arushi Singhal <arushisinghal19971997@...il.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)
Acked-by: Viresh Kumar <viresh.kumar@...aro.org>
--
viresh
Powered by blists - more mailing lists