All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <Uwe.Kleine-Koenig@digi.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH v2] handle failure of irqchip->set_type in setup_irq
Date: Thu, 10 Jul 2008 10:23:36 +0200	[thread overview]
Message-ID: <20080710082336.GA31219@digi.com> (raw)
In-Reply-To: <20080709145253.f658db37.akpm@linux-foundation.org>

Hello,

Andrew Morton wrote:
> > > However I'm presently brewing up a plot to do this:
> > >
> > >         printk("function name is %Ss\n", (unsigned long *)chip->set_type);
> > >
> > > which I think will work.  We can also do
> > >
> > >         printk("IP address is %Si\n", (unsigned long *)ip_address_buffer);
> > >
> > > to replace NIPQUAD.  And similar printk extensions.
> > >
> > > Am still thinking about it though.
> > I assume the result is 0fe1ef24f7bd0020f29ffe287dfdb9ead33ca0b2?
> 
> yup.
When I saw this commit I wondered that it was you who told me to think
about this but the commiter was Linus.
 
> > Should I send a new version using %pF or is it easier if you fix up the
> > patch?
> 
> A new version would be nice, thanks.  Or an incremental diff, but I can and
> will turn new versions into an incremental in the twinkle of an eye, so
> either is OK.
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

  reply	other threads:[~2008-07-10  8:24 UTC|newest]

Thread overview: 111+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-25 13:11 [PATCH] handle failure of irqchip->set_type in setup_irq Uwe Kleine-König
2008-07-02  9:17 ` Uwe Kleine-König
2008-07-02  9:49   ` Andrew Morton
2008-07-02 10:09     ` Uwe Kleine-König
2008-07-04 10:46 ` [PATCH v2] " Uwe Kleine-König
2008-07-04 17:17   ` Andrew Morton
2008-07-04 18:43     ` Uwe Kleine-König
2008-07-04 19:08       ` Andrew Morton
2008-07-09 13:13         ` Uwe Kleine-König
2008-07-09 21:52           ` Andrew Morton
2008-07-10  8:23             ` Uwe Kleine-König [this message]
2008-07-10  8:28               ` Andrew Morton
     [not found]   ` <20080704111540.ddffd241.akpm@linux-foundation.org>
     [not found]     ` <alpine.LFD.1.10.0807041147450.2815@woody.linux-foundation.org>
2008-07-04 20:02       ` the printk problem Linus Torvalds
2008-07-04 20:02         ` Linus Torvalds
2008-07-04 20:27         ` Andrew Morton
2008-07-04 20:27           ` Andrew Morton
2008-07-04 20:41           ` Linus Torvalds
2008-07-04 20:41             ` Linus Torvalds
2008-07-04 20:42           ` Matthew Wilcox
2008-07-04 20:42             ` Matthew Wilcox
2008-07-04 22:01             ` Andrew Morton
2008-07-04 22:01               ` Andrew Morton
2008-07-04 22:01               ` Andrew Morton
2008-07-05  2:03               ` Matthew Wilcox
2008-07-05  2:03                 ` Matthew Wilcox
2008-07-05  2:03                 ` Matthew Wilcox
2008-07-22 10:05                 ` [PATCH] Make u64 long long on all architectures (was: the printk problem) Andrew Morton
2008-07-22 10:05                   ` Andrew Morton
2008-07-22 10:05                   ` [PATCH] Make u64 long long on all architectures (was: the Andrew Morton
2008-07-22 10:36                   ` [PATCH] Make u64 long long on all architectures (was: the printk problem) Michael Ellerman
2008-07-22 10:36                     ` Michael Ellerman
2008-07-22 10:36                     ` [PATCH] Make u64 long long on all architectures (was: the Michael Ellerman
2008-07-22 10:53                     ` [PATCH] Make u64 long long on all architectures (was: the printk problem) Andrew Morton
2008-07-22 10:53                       ` Andrew Morton
2008-07-22 10:53                       ` [PATCH] Make u64 long long on all architectures (was: the Andrew Morton
2008-07-22 11:36                     ` [PATCH] Make u64 long long on all architectures (was: the printk problem) Benjamin Herrenschmidt
2008-07-22 11:36                       ` Benjamin Herrenschmidt
2008-07-22 11:36                       ` [PATCH] Make u64 long long on all architectures (was: the Benjamin Herrenschmidt
2008-07-22 11:35                   ` [PATCH] Make u64 long long on all architectures (was: the printk problem) Benjamin Herrenschmidt
2008-07-22 11:35                     ` Benjamin Herrenschmidt
2008-07-22 11:35                     ` [PATCH] Make u64 long long on all architectures (was: the Benjamin Herrenschmidt
2008-07-05 10:20               ` the printk problem Denys Vlasenko
2008-07-05 10:20                 ` Denys Vlasenko
2008-07-05 10:20                 ` Denys Vlasenko
2008-07-05 11:33               ` Jan Engelhardt
2008-07-05 11:33                 ` Jan Engelhardt
2008-07-05 11:33                 ` Jan Engelhardt
2008-07-04 22:58             ` Benjamin Herrenschmidt
2008-07-04 22:58               ` Benjamin Herrenschmidt
2008-07-04 20:36         ` Matthew Wilcox
2008-07-04 20:36           ` Matthew Wilcox
2008-07-08  1:44           ` Kyle McMartin
2008-07-08  1:44             ` Kyle McMartin
2008-07-04 23:00         ` Benjamin Herrenschmidt
2008-07-04 23:00           ` Benjamin Herrenschmidt
2008-07-04 23:25           ` Linus Torvalds
2008-07-04 23:25             ` Linus Torvalds
2008-07-05 22:32             ` Linus Torvalds
2008-07-05 22:32               ` Linus Torvalds
2008-07-05 22:57               ` Arjan van de Ven
2008-07-05 22:57                 ` Arjan van de Ven
2008-07-06  5:27               ` Ingo Molnar
2008-07-06  5:27                 ` Ingo Molnar
2008-07-06  5:37                 ` Linus Torvalds
2008-07-06  5:37                   ` Linus Torvalds
2008-07-06  5:37                   ` Linus Torvalds
2008-07-06  5:53                   ` Ingo Molnar
2008-07-06  5:53                     ` Ingo Molnar
2008-07-06  5:53                     ` Ingo Molnar
2008-07-06  6:13                     ` Ingo Molnar
2008-07-06  6:13                       ` Ingo Molnar
2008-07-06  6:13                       ` Ingo Molnar
2008-07-07  1:14             ` Benjamin Herrenschmidt
2008-07-07  1:14               ` Benjamin Herrenschmidt
2008-07-07  3:26               ` Stephen Rothwell
2008-07-07  3:28                 ` Michael Ellerman
2008-07-07  4:59                   ` Stephen Rothwell
2008-07-07  3:43                 ` Benjamin Herrenschmidt
2008-07-05 12:52         ` Vegard Nossum
2008-07-05 12:52           ` Vegard Nossum
2008-07-05 12:52           ` Vegard Nossum
2008-07-05 13:24           ` Jan Engelhardt
2008-07-05 13:24             ` Jan Engelhardt
2008-07-05 13:24             ` Jan Engelhardt
2008-07-05 13:50             ` Vegard Nossum
2008-07-05 13:50               ` Vegard Nossum
2008-07-05 13:50               ` Vegard Nossum
2008-07-05 14:07               ` Jan Engelhardt
2008-07-05 14:07                 ` Jan Engelhardt
2008-07-05 14:07                 ` Jan Engelhardt
2008-07-05 17:56           ` Linus Torvalds
2008-07-05 17:56             ` Linus Torvalds
2008-07-05 17:56             ` Linus Torvalds
2008-07-05 18:40             ` Jan Engelhardt
2008-07-05 18:40               ` Jan Engelhardt
2008-07-05 18:40               ` Jan Engelhardt
2008-07-05 18:44               ` Linus Torvalds
2008-07-05 18:44                 ` Linus Torvalds
2008-07-05 18:44                 ` Linus Torvalds
2008-07-05 18:41             ` Vegard Nossum
2008-07-05 18:41               ` Vegard Nossum
2008-07-05 18:41               ` Vegard Nossum
2008-07-05 18:52               ` Matthew Wilcox
2008-07-05 18:52                 ` Matthew Wilcox
2008-07-05 18:52                 ` Matthew Wilcox
2008-07-06  0:02                 ` Pekka Enberg
2008-07-06  0:02                   ` Pekka Enberg
2008-07-06  0:02                   ` Pekka Enberg
2008-07-06  5:17                   ` Randy Dunlap
2008-07-06  5:17                     ` Randy Dunlap
2008-07-06  5:17                     ` Randy Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080710082336.GA31219@digi.com \
    --to=uwe.kleine-koenig@digi.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.