Re: [PATCH v2] handle failure of irqchip->set_type in setup_irq

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andrew Morton <akpm@...>
Cc: linux-kernel@vger.kernel.org <linux-kernel@...>, Thomas Gleixner <tglx@...>, Ingo Molnar <mingo@...>
Date: Thursday, July 10, 2008 - 4:23 am

Hello,

Andrew Morton wrote:
When I saw this commit I wondered that it was you who told me to think
about this but the commiter was Linus.
 
voilà:

--->8---
From c991997725fdce93352aab53ccab34f41b5afd52 Mon Sep 17 00:00:00 2001
From: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
Date: Thu, 10 Jul 2008 10:03:59 +0200
Subject: [PATCH] __irq_set_trigger: use %pF to print the set_type callback's name
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

This uses the new feature of printk introduced in
0fe1ef24f7bd0020f29ffe287dfdb9ead33ca0b2.

The actual output is unchanged.

Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
---
 kernel/irq/manage.c |   11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 178b966..e01ad8e 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -287,14 +287,9 @@ static int __irq_set_trigger(struct irq_chip *chip, unsigned int irq,
 
 	ret = chip->set_type(irq, flags & IRQF_TRIGGER_MASK);
 
-	if (ret) {
-		char buf[100];
-
-		snprintf(buf, sizeof(buf), KERN_ERR
-				"setting flow type for irq %u failed (%%s)\n",
-				irq);
-		print_fn_descriptor_symbol(buf, chip->set_type);
-	}
+	if (ret)
+		pr_err("setting flow type for irq %u failed (%pF)\n",
+				irq, chip->set_type);
 
 	return ret;
 }
-- 
1.5.6


-- 
Uwe Kleine-König, Software Engineer
Digi International GmbH Branch Breisach, Küferstrasse 8, 79206 Breisach, Germany
Tax: 315/5781/0242 / VAT: DE153662976 / Reg. Amtsgericht Dortmund HRB 13962
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread: