mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-09-04 20:19:47 +08:00 
			
		
		
		
	mfd: ab8500-debugfs: Remove the racy fiddling with irq_desc
First of all drivers have absolutely no business to dig into the internals of an irq descriptor. That's core code and subject to change. All of this information is readily available to /proc/interrupts in a safe and race free way. Remove the inspection code which is a blatant violation of subsystem boundaries and racy against concurrent modifications of the interrupt descriptor. Print the irq line instead so the information can be looked up in a sane way in /proc/interrupts. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20201210194044.157283633@linutronix.de
This commit is contained in:
		
							parent
							
								
									f3925032d7
								
							
						
					
					
						commit
						886c812165
					
				| @ -1513,24 +1513,14 @@ static int ab8500_interrupts_show(struct seq_file *s, void *p) | |||||||
| { | { | ||||||
| 	int line; | 	int line; | ||||||
| 
 | 
 | ||||||
| 	seq_puts(s, "name: number:  number of: wake:\n"); | 	seq_puts(s, "name: number: irq: number of: wake:\n"); | ||||||
| 
 | 
 | ||||||
| 	for (line = 0; line < num_interrupt_lines; line++) { | 	for (line = 0; line < num_interrupt_lines; line++) { | ||||||
| 		struct irq_desc *desc = irq_to_desc(line + irq_first); | 		seq_printf(s, "%3i:  %4i %6i %4i\n", | ||||||
| 
 |  | ||||||
| 		seq_printf(s, "%3i:  %6i %4i", |  | ||||||
| 			   line, | 			   line, | ||||||
|  | 			   line + irq_first, | ||||||
| 			   num_interrupts[line], | 			   num_interrupts[line], | ||||||
| 			   num_wake_interrupts[line]); | 			   num_wake_interrupts[line]); | ||||||
| 
 |  | ||||||
| 		if (desc && desc->name) |  | ||||||
| 			seq_printf(s, "-%-8s", desc->name); |  | ||||||
| 		if (desc && desc->action) { |  | ||||||
| 			struct irqaction *action = desc->action; |  | ||||||
| 
 |  | ||||||
| 			seq_printf(s, "  %s", action->name); |  | ||||||
| 			while ((action = action->next) != NULL) |  | ||||||
| 				seq_printf(s, ", %s", action->name); |  | ||||||
| 		} | 		} | ||||||
| 		seq_putc(s, '\n'); | 		seq_putc(s, '\n'); | ||||||
| 	} | 	} | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Thomas Gleixner
						Thomas Gleixner