summaryrefslogtreecommitdiff
path: root/kernel/irq/internals.h
diff options
context:
space:
mode:
authorBoqun Feng <boqun.feng@gmail.com>2015-12-29 12:18:48 +0800
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2016-02-23 19:59:54 -0800
commitb354286effa52da6cb1b1f16604d41ff81b8c445 (patch)
tree9657369ab89a8d8c8200fcb5ba796619a6ea41f8 /kernel/irq/internals.h
parent67c583a7de3433a971983490b37ad2bff3c55463 (diff)
downloadlinux-b354286effa52da6cb1b1f16604d41ff81b8c445.tar.gz
irq: Privatize irq_common_data::state_use_accessors
irq_common_data::state_use_accessors is not designed for public use. Therefore make it private so that people who write code accessing it directly will get blamed by sparse. Also #undef the macro __irqd_to_state after used in header files, so that the macro can't be misused. Signed-off-by: Boqun Feng <boqun.feng@gmail.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/irq/internals.h')
-rw-r--r--kernel/irq/internals.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/irq/internals.h b/kernel/irq/internals.h
index fcab63c66905..3d182932d2d1 100644
--- a/kernel/irq/internals.h
+++ b/kernel/irq/internals.h
@@ -160,6 +160,8 @@ irq_put_desc_unlock(struct irq_desc *desc, unsigned long flags)
__irq_put_desc_unlock(desc, flags, false);
}
+#define __irqd_to_state(d) ACCESS_PRIVATE((d)->common, state_use_accessors)
+
/*
* Manipulation functions for irq_data.state
*/
@@ -188,6 +190,8 @@ static inline bool irqd_has_set(struct irq_data *d, unsigned int mask)
return __irqd_to_state(d) & mask;
}
+#undef __irqd_to_state
+
static inline void kstat_incr_irqs_this_cpu(struct irq_desc *desc)
{
__this_cpu_inc(*desc->kstat_irqs);