From: Harvey Harrison <harvey.harrison@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: [PATCH 09/10] misc: fix returning void-valued expression warnings
Date: Wed, 30 Apr 2008 15:03:44 -0700 [thread overview]
Message-ID: <1209593024.24729.119.camel@brick> (raw)
kernel/sched_fair.c:845:3: warning: returning void-valued expression
kernel/sched.c:4343:3: warning: returning void-valued expression
security/security.c:897:2: warning: returning void-valued expression
security/security.c:1014:2: warning: returning void-valued expression
security/security.c:1019:2: warning: returning void-valued expression
sound/sound_core.c:410:2: warning: returning void-valued expression
sound/sound_core.c:427:2: warning: returning void-valued expression
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
---
Peter, I know you don't like this very much, but it would help reduce the
trivial noise somewhat in a sparse build.
kernel/sched.c | 6 ++++--
kernel/sched_fair.c | 6 ++++--
security/security.c | 6 +++---
sound/sound_core.c | 4 ++--
4 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/kernel/sched.c b/kernel/sched.c
index e2f7f5a..864daf8 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -4339,8 +4339,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);
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 89fa32b..0bd575e 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -841,8 +841,10 @@ entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr, int queued)
* queued ticks are scheduled to match the slice, so don't bother
* validating it and just reschedule.
*/
- if (queued)
- return resched_task(rq_of(cfs_rq)->curr);
+ if (queued) {
+ resched_task(rq_of(cfs_rq)->curr);
+ return;
+ }
/*
* don't let the period tick interfere with the hrtick preemption
*/
diff --git a/security/security.c b/security/security.c
index 59838a9..8073a1a 100644
--- a/security/security.c
+++ b/security/security.c
@@ -894,7 +894,7 @@ EXPORT_SYMBOL(security_secctx_to_secid);
void security_release_secctx(char *secdata, u32 seclen)
{
- return security_ops->release_secctx(secdata, seclen);
+ security_ops->release_secctx(secdata, seclen);
}
EXPORT_SYMBOL(security_release_secctx);
@@ -1011,12 +1011,12 @@ int security_sk_alloc(struct sock *sk, int family, gfp_t priority)
void security_sk_free(struct sock *sk)
{
- return security_ops->sk_free_security(sk);
+ security_ops->sk_free_security(sk);
}
void security_sk_clone(const struct sock *sk, struct sock *newsk)
{
- return security_ops->sk_clone_security(sk, newsk);
+ security_ops->sk_clone_security(sk, newsk);
}
void security_sk_classify_flow(struct sock *sk, struct flowi *fl)
diff --git a/sound/sound_core.c b/sound/sound_core.c
index 46daca1..b2538bf 100644
--- a/sound/sound_core.c
+++ b/sound/sound_core.c
@@ -407,7 +407,7 @@ EXPORT_SYMBOL(unregister_sound_mixer);
void unregister_sound_midi(int unit)
{
- return sound_remove_unit(&chains[2], unit);
+ sound_remove_unit(&chains[2], unit);
}
EXPORT_SYMBOL(unregister_sound_midi);
@@ -424,7 +424,7 @@ EXPORT_SYMBOL(unregister_sound_midi);
void unregister_sound_dsp(int unit)
{
- return sound_remove_unit(&chains[3], unit);
+ sound_remove_unit(&chains[3], unit);
}
--
1.5.5.1.305.g7c84
next reply other threads:[~2008-04-30 22:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-30 22:03 Harvey Harrison [this message]
2008-05-01 11:43 ` [PATCH 09/10] misc: fix returning void-valued expression warnings Boaz Harrosh
2008-05-01 12:00 ` Al Viro
2008-05-01 12:17 ` Peter Zijlstra
2008-05-01 12:51 ` Al Viro
2008-05-01 21:27 ` David Miller
2008-05-01 12:42 ` Boaz Harrosh
2008-05-01 12:53 ` Al Viro
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=1209593024.24729.119.camel@brick \
--to=harvey.harrison@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
/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