mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] tiny sched_getaffinity cleanup
@ 2007-07-30  2:16 Ulrich Drepper
  2007-08-06  7:24 ` Ingo Molnar
  0 siblings, 1 reply; 2+ messages in thread
From: Ulrich Drepper @ 2007-07-30  2:16 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm

Unless I'm missing something quite tricky here's another tiny cleanup.  The
generated code is not affected (gcc is smart enough) but for people looking
over the code it is just irritating to have the extra conditional.


Signed-off-by: Ulrich Drepper <drepper@redhat.com>

--- kernel/sched.c	2007-07-26 14:54:53.000000000 -0700
+++ kernel/sched.c-new	2007-07-29 19:12:16.000000000 -0700
@@ -4464,10 +4464,8 @@ long sched_getaffinity(pid_t pid, cpumas
 out_unlock:
 	read_unlock(&tasklist_lock);
 	mutex_unlock(&sched_hotcpu_mutex);
-	if (retval)
-		return retval;
 
-	return 0;
+	return retval;
 }
 
 /**

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] tiny sched_getaffinity cleanup
  2007-07-30  2:16 [PATCH] tiny sched_getaffinity cleanup Ulrich Drepper
@ 2007-08-06  7:24 ` Ingo Molnar
  0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2007-08-06  7:24 UTC (permalink / raw)
  To: Ulrich Drepper; +Cc: linux-kernel, akpm


* Ulrich Drepper <drepper@redhat.com> wrote:

> Unless I'm missing something quite tricky here's another tiny cleanup.  
> The generated code is not affected (gcc is smart enough) but for 
> people looking over the code it is just irritating to have the extra 
> conditional.

thanks, i've applied your cleanup to my tree.

	Ingo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-08-06  7:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-30  2:16 [PATCH] tiny sched_getaffinity cleanup Ulrich Drepper
2007-08-06  7:24 ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®