public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/3] sched: trivial sparse warning in sched.c
Date: Sat, 16 Feb 2008 22:11:29 +0100	[thread overview]
Message-ID: <1203196289.6301.20.camel@lappy> (raw)
In-Reply-To: <1203098196.15275.5.camel@brick>


On Fri, 2008-02-15 at 09:56 -0800, Harvey Harrison wrote:
> kernel/sched.c:3680:3: warning: returning void-valued expression

I'm wondering,... why is this wrong?

> Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
> ---
>  kernel/sched.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/sched.c b/kernel/sched.c
> index f28f19e..824d5a9 100644
> --- a/kernel/sched.c
> +++ b/kernel/sched.c
> @@ -3676,8 +3676,10 @@ void account_system_time(struct task_struct *p, int hardirq_offset,
>  	struct rq *rq = this_rq();
>  	cputime64_t tmp;
>  
> -	if ((p->flags & PF_VCPU) && (irq_count() - hardirq_offset == 0))
> -		return account_guest_time(p, cputime);
> +	if ((p->flags & PF_VCPU) && (irq_count() - hardirq_offset == 0)) {
> +		account_guest_time(p, cputime);
> +		return;
> +	}
>  
>  	p->stime = cputime_add(p->stime, cputime);
>  


  reply	other threads:[~2008-02-16 21:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-15 17:56 [PATCH 2/3] sched: trivial sparse warning in sched.c Harvey Harrison
2008-02-16 21:11 ` Peter Zijlstra [this message]
2008-02-16 21:27   ` Cyrill Gorcunov
2008-02-16 21:45     ` Peter Zijlstra
2008-02-17  8:38       ` Cyrill Gorcunov

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=1203196289.6301.20.camel@lappy \
    --to=a.p.zijlstra@chello.nl \
    --cc=harvey.harrison@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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