aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiang Liu <jiang.liu@linux.intel.com>2014-06-09 04:19:43 -0400
committerThomas Gleixner <tglx@linutronix.de>2014-06-21 17:05:41 -0400
commit32f5ef5d8dd5ac3cc7ac12cdaf33023e2fbd33c1 (patch)
treeb2aabdb03d6d08888a4bf62209dce504b7abd470
parentf44d16929638a6dc34bdd51e7422e7e3c1d0b904 (diff)
x86, ioapic: Use irq_cfg() instead of irq_get_chip_data() for better readability
Use defined helper function irq_cfg() instead of irq_get_chip_data() for better readability. Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Cc: Tony Luck <tony.luck@intel.com> Cc: Joerg Roedel <joro@8bytes.org> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Grant Likely <grant.likely@linaro.org> Cc: Rafael J. Wysocki <rjw@rjwysocki.net> Cc: Bjorn Helgaas <bhelgaas@google.com> Cc: Randy Dunlap <rdunlap@infradead.org> Cc: Yinghai Lu <yinghai@kernel.org> Link: http://lkml.kernel.org/r/1402302011-23642-15-git-send-email-jiang.liu@linux.intel.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r--arch/x86/kernel/apic/io_apic.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 16b0247392a5..446a931d5f44 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -230,7 +230,7 @@ int __init arch_early_irq_init(void)
230 return 0; 230 return 0;
231} 231}
232 232
233static struct irq_cfg *irq_cfg(unsigned int irq) 233static inline struct irq_cfg *irq_cfg(unsigned int irq)
234{ 234{
235 return irq_get_chip_data(irq); 235 return irq_get_chip_data(irq);
236} 236}
@@ -272,7 +272,7 @@ static struct irq_cfg *alloc_irq_and_cfg_at(unsigned int at, int node)
272 if (res < 0) { 272 if (res < 0) {
273 if (res != -EEXIST) 273 if (res != -EEXIST)
274 return NULL; 274 return NULL;
275 cfg = irq_get_chip_data(at); 275 cfg = irq_cfg(at);
276 if (cfg) 276 if (cfg)
277 return cfg; 277 return cfg;
278 } 278 }
@@ -1204,7 +1204,7 @@ void __setup_vector_irq(int cpu)
1204 raw_spin_lock(&vector_lock); 1204 raw_spin_lock(&vector_lock);
1205 /* Mark the inuse vectors */ 1205 /* Mark the inuse vectors */
1206 for_each_active_irq(irq) { 1206 for_each_active_irq(irq) {
1207 cfg = irq_get_chip_data(irq); 1207 cfg = irq_cfg(irq);
1208 if (!cfg) 1208 if (!cfg)
1209 continue; 1209 continue;
1210 1210
@@ -1612,7 +1612,7 @@ __apicdebuginit(void) print_IO_APICs(void)
1612 if (chip != &ioapic_chip) 1612 if (chip != &ioapic_chip)
1613 continue; 1613 continue;
1614 1614
1615 cfg = irq_get_chip_data(irq); 1615 cfg = irq_cfg(irq);
1616 if (!cfg) 1616 if (!cfg)
1617 continue; 1617 continue;
1618 entry = cfg->irq_2_pin; 1618 entry = cfg->irq_2_pin;
@@ -2253,7 +2253,7 @@ static void irq_complete_move(struct irq_cfg *cfg)
2253 2253
2254void irq_force_complete_move(int irq) 2254void irq_force_complete_move(int irq)
2255{ 2255{
2256 struct irq_cfg *cfg = irq_get_chip_data(irq); 2256 struct irq_cfg *cfg = irq_cfg(irq);
2257 2257
2258 if (!cfg) 2258 if (!cfg)
2259 return; 2259 return;
@@ -2515,7 +2515,7 @@ static inline void init_IO_APIC_traps(void)
2515 unsigned int irq; 2515 unsigned int irq;
2516 2516
2517 for_each_active_irq(irq) { 2517 for_each_active_irq(irq) {
2518 cfg = irq_get_chip_data(irq); 2518 cfg = irq_cfg(irq);
2519 if (IO_APIC_IRQ(irq) && cfg && !cfg->vector) { 2519 if (IO_APIC_IRQ(irq) && cfg && !cfg->vector) {
2520 /* 2520 /*
2521 * Hmm.. We don't have an entry for this, 2521 * Hmm.. We don't have an entry for this,
@@ -2648,7 +2648,7 @@ early_param("disable_timer_pin_1", disable_timer_pin_setup);
2648 */ 2648 */
2649static inline void __init check_timer(void) 2649static inline void __init check_timer(void)
2650{ 2650{
2651 struct irq_cfg *cfg = irq_get_chip_data(0); 2651 struct irq_cfg *cfg = irq_cfg(0);
2652 int node = cpu_to_node(0); 2652 int node = cpu_to_node(0);
2653 int apic1, pin1, apic2, pin2; 2653 int apic1, pin1, apic2, pin2;
2654 unsigned long flags; 2654 unsigned long flags;
@@ -2912,7 +2912,7 @@ int arch_setup_hwirq(unsigned int irq, int node)
2912 2912
2913void arch_teardown_hwirq(unsigned int irq) 2913void arch_teardown_hwirq(unsigned int irq)
2914{ 2914{
2915 struct irq_cfg *cfg = irq_get_chip_data(irq); 2915 struct irq_cfg *cfg = irq_cfg(irq);
2916 unsigned long flags; 2916 unsigned long flags;
2917 2917
2918 free_remapped_irq(irq); 2918 free_remapped_irq(irq);
@@ -3039,7 +3039,7 @@ int setup_msi_irq(struct pci_dev *dev, struct msi_desc *msidesc,
3039 if (!irq_offset) 3039 if (!irq_offset)
3040 write_msi_msg(irq, &msg); 3040 write_msi_msg(irq, &msg);
3041 3041
3042 setup_remapped_irq(irq, irq_get_chip_data(irq), chip); 3042 setup_remapped_irq(irq, irq_cfg(irq), chip);
3043 3043
3044 irq_set_chip_and_handler_name(irq, chip, handle_edge_irq, "edge"); 3044 irq_set_chip_and_handler_name(irq, chip, handle_edge_irq, "edge");
3045 3045
@@ -3178,7 +3178,7 @@ int default_setup_hpet_msi(unsigned int irq, unsigned int id)
3178 3178
3179 hpet_msi_write(irq_get_handler_data(irq), &msg); 3179 hpet_msi_write(irq_get_handler_data(irq), &msg);
3180 irq_set_status_flags(irq, IRQ_MOVE_PCNTXT); 3180 irq_set_status_flags(irq, IRQ_MOVE_PCNTXT);
3181 setup_remapped_irq(irq, irq_get_chip_data(irq), chip); 3181 setup_remapped_irq(irq, irq_cfg(irq), chip);
3182 3182
3183 irq_set_chip_and_handler_name(irq, chip, handle_edge_irq, "edge"); 3183 irq_set_chip_and_handler_name(irq, chip, handle_edge_irq, "edge");
3184 return 0; 3184 return 0;