diff mbox series

gpiolib: Lower verbosity when allocating hierarchy irq

Message ID 20200120095625.25164-1-haokexin@gmail.com
State New
Headers show
Series gpiolib: Lower verbosity when allocating hierarchy irq | expand

Commit Message

Kevin Hao Jan. 20, 2020, 9:56 a.m. UTC
In the current codes, the following 3 lines would be output to
the console for each irq line.
  gpio gpiochip0: (gpio_thunderx): allocate IRQ 10, hwirq 0
  gpio gpiochip0: (gpio_thunderx): found parent hwirq 245784
  gpio gpiochip0: (gpio_thunderx): alloc_irqs_parent for 10 parent hwirq 245784

In general, there are about tens of irq lines for each gpio chip,
and then it would emit so many insignificant log in the boot process.
These infos are more suitable for the dbg purpose. So change these
to the dbg level. With this change, about 200 lines are suppressed
on my Marvell cn96xx board.

Signed-off-by: Kevin Hao <haokexin@gmail.com>
---
 drivers/gpio/gpiolib.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Linus Walleij Jan. 23, 2020, 2:46 p.m. UTC | #1
On Mon, Jan 20, 2020 at 11:07 AM Kevin Hao <haokexin@gmail.com> wrote:

> In the current codes, the following 3 lines would be output to
> the console for each irq line.
>   gpio gpiochip0: (gpio_thunderx): allocate IRQ 10, hwirq 0
>   gpio gpiochip0: (gpio_thunderx): found parent hwirq 245784
>   gpio gpiochip0: (gpio_thunderx): alloc_irqs_parent for 10 parent hwirq 245784
>
> In general, there are about tens of irq lines for each gpio chip,
> and then it would emit so many insignificant log in the boot process.
> These infos are more suitable for the dbg purpose. So change these
> to the dbg level. With this change, about 200 lines are suppressed
> on my Marvell cn96xx board.
>
> Signed-off-by: Kevin Hao <haokexin@gmail.com>

Patch applied, thanks for your hard work on this Kevin!

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index e9f168b276ad..66e66c141fe8 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -2006,7 +2006,7 @@  static int gpiochip_hierarchy_irq_domain_alloc(struct irq_domain *d,
 	if (ret)
 		return ret;
 
-	chip_info(gc, "allocate IRQ %d, hwirq %lu\n", irq,  hwirq);
+	chip_dbg(gc, "allocate IRQ %d, hwirq %lu\n", irq,  hwirq);
 
 	ret = girq->child_to_parent_hwirq(gc, hwirq, type,
 					  &parent_hwirq, &parent_type);
@@ -2014,7 +2014,7 @@  static int gpiochip_hierarchy_irq_domain_alloc(struct irq_domain *d,
 		chip_err(gc, "can't look up hwirq %lu\n", hwirq);
 		return ret;
 	}
-	chip_info(gc, "found parent hwirq %u\n", parent_hwirq);
+	chip_dbg(gc, "found parent hwirq %u\n", parent_hwirq);
 
 	/*
 	 * We set handle_bad_irq because the .set_type() should
@@ -2034,7 +2034,7 @@  static int gpiochip_hierarchy_irq_domain_alloc(struct irq_domain *d,
 	if (!parent_arg)
 		return -ENOMEM;
 
-	chip_info(gc, "alloc_irqs_parent for %d parent hwirq %d\n",
+	chip_dbg(gc, "alloc_irqs_parent for %d parent hwirq %d\n",
 		  irq, parent_hwirq);
 	irq_set_lockdep_class(irq, gc->irq.lock_key, gc->irq.request_key);
 	ret = irq_domain_alloc_irqs_parent(d, irq, 1, parent_arg);