Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1623816

[tip:irq/core] kernel/irq: Use cpumask_available() for check of cpumask variable

From tip-bot for Matthias Kaehlcke <tipbot@zytor.com>
Newsgroups linux.kernel
Subject [tip:irq/core] kernel/irq: Use cpumask_available() for check of cpumask variable
Date 2017-04-14 20:00 +0200
Message-ID <twdFL-43B-5@gated-at.bofh.it> (permalink)
References <tvvbI-7UV-31@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Commit-ID:  31299f44f42dd8dbc5ed200d3064f9c6ddbd3447
Gitweb:     http://git.kernel.org/tip/31299f44f42dd8dbc5ed200d3064f9c6ddbd3447
Author:     Matthias Kaehlcke <mka@chromium.org>
AuthorDate: Wed, 12 Apr 2017 11:20:30 -0700
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 14 Apr 2017 19:50:47 +0200

kernel/irq: Use cpumask_available() for check of cpumask variable

This fixes the following clang warning when CONFIG_CPUMASK_OFFSTACK=n:

kernel/irq/manage.c:839:28: error: address of array
'desc->irq_common_data.affinity' will always evaluate to 'true'
[-Werror,-Wpointer-bool-conversion]

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Cc: Grant Grundler <grundler@chromium.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Greg Hackmann <ghackmann@google.com>
Cc: Michael Davidson <md@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Link: http://lkml.kernel.org/r/20170412182030.83657-2-mka@chromium.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

---
 kernel/irq/manage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index a4afe5c..155e3c3 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -852,7 +852,7 @@ irq_thread_check_affinity(struct irq_desc *desc, struct irqaction *action)
 	 * This code is triggered unconditionally. Check the affinity
 	 * mask pointer. For CPU_MASK_OFFSTACK=n this is optimized out.
 	 */
-	if (desc->irq_common_data.affinity)
+	if (cpumask_available(desc->irq_common_data.affinity))
 		cpumask_copy(mask, desc->irq_common_data.affinity);
 	else
 		valid = false;

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 1/2] cpumask: Add helper cpumask_available() Matthias Kaehlcke <mka@chromium.org> - 2017-04-12 20:30 +0200
  [PATCH v2 2/2] kernel/irq: Use cpumask_available() for check of cpumask variable Matthias Kaehlcke <mka@chromium.org> - 2017-04-12 20:30 +0200
    Re: [PATCH v2 2/2] kernel/irq: Use cpumask_available() for check of  cpumask variable Thomas Gleixner <tglx@linutronix.de> - 2017-04-14 20:00 +0200
    [tip:irq/core] kernel/irq: Use cpumask_available() for check of  cpumask variable tip-bot for Matthias Kaehlcke <tipbot@zytor.com> - 2017-04-14 20:00 +0200
    [tip:irq/core] genirq: Use cpumask_available() for check of cpumask  variable tip-bot for Matthias Kaehlcke <tipbot@zytor.com> - 2017-04-14 21:00 +0200
  [tip:irq/core] cpumask: Add helper cpumask_available() tip-bot for Matthias Kaehlcke <tipbot@zytor.com> - 2017-04-14 20:00 +0200

csiph-web