The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Arushi Singhal <arushisinghal19971997@gmail.com>
Cc: pure.logic@nexus-software.ie, devel@driverdev.osuosl.org,
	Alex Elder <elder@kernel.org>,
	outreachy-kernel@googlegroups.com,
	Johan Hovold <johan@kernel.org>,
	linux-kernel@vger.kernel.org, greybus-dev@lists.linaro.org
Subject: Re: [greybus-dev] [PATCH] staging: greybus: compress return logic
Date: Mon, 10 Apr 2017 10:15:11 +0530	[thread overview]
Message-ID: <20170410044511.GA4377@vireshk-i7> (raw)
In-Reply-To: <20170325052007.GA4908@arushi-HP-Pavilion-Notebook>

On 25-03-17, 10:50, Arushi Singhal wrote:
> 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)

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh

      reply	other threads:[~2017-04-10  4:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-25  5:20 [PATCH] staging: greybus: compress return logic Arushi Singhal
2017-04-10  4:45 ` Viresh Kumar [this message]

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=20170410044511.GA4377@vireshk-i7 \
    --to=viresh.kumar@linaro.org \
    --cc=arushisinghal19971997@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=elder@kernel.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