summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorMatthias Kaehlcke <mka@chromium.org>2017-04-17 01:34:59 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2017-04-18 17:13:58 +1000
commit8e2ce680aa2cd0979b2a325f3a156b6d6afd23e8 (patch)
tree63c224a0f2962f70c2e7741ae8bca059608d4526 /Documentation
parentbed51e4889f42ddd918a914927b5c0e436a7ed1a (diff)
cpumask: add helper cpumask_available()
With CONFIG_CPUMASK_OFFSTACK=y cpumask_var_t is a struct cpumask pointer, otherwise a struct cpumask array with a single element. Some code dealing with cpumasks needs to validate that a cpumask_var_t is not a NULL pointer when CONFIG_CPUMASK_OFFSTACK=y. This is typically done by performing the check always, regardless of the underlying type of cpumask_var_t. This works in both cases, however clang raises a warning like this 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] Add the inline helper cpumask_available() which only performs the pointer check if CONFIG_CPUMASK_OFFSTACK=y. Link: http://lkml.kernel.org/r/20170412182030.83657-1-mka@chromium.org Signed-off-by: Matthias Kaehlcke <mka@chromium.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Grant Grundler <grundler@chromium.org> Cc: Greg Hackmann <ghackmann@google.com> Cc: Michael Davidson <md@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions