All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] setup_affinity return 1 with failure
@ 2009-06-14 15:33 Yong Zhang
  2009-06-15  3:20 ` Américo Wang
  0 siblings, 1 reply; 2+ messages in thread
From: Yong Zhang @ 2009-06-14 15:33 UTC (permalink / raw)
  To: mingo; +Cc: linux-kernel

setup_affinity should return 1 when failure, then make checking in
irq_select_affinity_usr() reasonable.

Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
---
 kernel/irq/manage.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index aaf5c9d..8d2a992 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -137,7 +137,7 @@ int irq_set_affinity(unsigned int irq, const
struct cpumask *cpumask)
 static int setup_affinity(unsigned int irq, struct irq_desc *desc)
 {
 	if (!irq_can_set_affinity(irq))
-		return 0;
+		return 1;

 	/*
 	 * Preserve an userspace affinity setup, but make sure that
-- 
1.6.0.4

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

* Re: [PATCH] setup_affinity return 1 with failure
  2009-06-14 15:33 [PATCH] setup_affinity return 1 with failure Yong Zhang
@ 2009-06-15  3:20 ` Américo Wang
  0 siblings, 0 replies; 2+ messages in thread
From: Américo Wang @ 2009-06-15  3:20 UTC (permalink / raw)
  To: Yong Zhang; +Cc: mingo, linux-kernel

On Sun, Jun 14, 2009 at 11:33 PM, Yong Zhang<yong.zhang0@gmail.com> wrote:
> setup_affinity should return 1 when failure, then make checking in
> irq_select_affinity_usr() reasonable.
>
> Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>

Looks good.

Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>

> ---
>  kernel/irq/manage.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
> index aaf5c9d..8d2a992 100644
> --- a/kernel/irq/manage.c
> +++ b/kernel/irq/manage.c
> @@ -137,7 +137,7 @@ int irq_set_affinity(unsigned int irq, const
> struct cpumask *cpumask)
>  static int setup_affinity(unsigned int irq, struct irq_desc *desc)
>  {
>        if (!irq_can_set_affinity(irq))
> -               return 0;
> +               return 1;
>
>        /*
>         * Preserve an userspace affinity setup, but make sure that
> --
> 1.6.0.4
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>

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

end of thread, other threads:[~2009-06-15  3:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-14 15:33 [PATCH] setup_affinity return 1 with failure Yong Zhang
2009-06-15  3:20 ` Américo Wang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.