mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Torben Hohn <torbenh@gmx.de>
To: linux-kernel@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
	linuxpps@ml.enneenne.com, Torben Hohn <torbenh@gmx.de>
Subject: [PATCH 5/5] RFC genirq: enforce dev_id to be struct timespec * with IRQF_TIMESTAMP
Date: Mon, 21 Mar 2011 12:59:20 +0100	[thread overview]
Message-ID: <1300708760-27910-5-git-send-email-torbenh@gmx.de> (raw)
In-Reply-To: <1300708760-27910-1-git-send-email-torbenh@gmx.de>

we can enforce the dev_id to be a struct timespec * in
irq_turn_on_timestamping() and irq_turn_off_timestamping()

Signed-off-by: Torben Hohn <torbenh@gmx.de>
---
 include/linux/interrupt.h |    4 ++--
 kernel/irq/manage.c       |    8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index cc9ed9c..759fead 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -175,8 +175,8 @@ request_any_context_irq(unsigned int irq, irq_handler_t handler,
 static inline void exit_irq_thread(void) { }
 #endif
 
-extern void irq_turn_on_timestamping(unsigned int irq, void *dev_id);
-extern void irq_turn_off_timestamping(unsigned int irq, void *dev_id);
+extern void irq_turn_on_timestamping(unsigned int irq, struct timespec *dev_id);
+extern void irq_turn_off_timestamping(unsigned int irq, struct timespec *dev_id);
 
 extern void free_irq(unsigned int, void *);
 
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 66e9501..3ac9acc 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -656,7 +656,7 @@ void exit_irq_thread(void)
  *
  *	Turning on timestamping nests.
  */
-void irq_turn_on_timestamping(unsigned int irq, void *dev_id)
+void irq_turn_on_timestamping(unsigned int irq, struct timespec *dev_id)
 {
 	struct irq_desc *desc = irq_to_desc(irq);
 	unsigned long flags;
@@ -667,7 +667,7 @@ void irq_turn_on_timestamping(unsigned int irq, void *dev_id)
 
 	act = desc->action;
 	while (act) {
-		if (act->dev_id == dev_id) {
+		if (act->dev_id == (void *)dev_id) {
 			act->flags |= IRQF_TIMESTAMP;
 			break;
 		}
@@ -689,7 +689,7 @@ EXPORT_SYMBOL_GPL(irq_turn_on_timestamping);
  *
  *	Turning on timestamping nests.
  */
-void irq_turn_off_timestamping(unsigned int irq, void *dev_id)
+void irq_turn_off_timestamping(unsigned int irq, struct timespec *dev_id)
 {
 	struct irq_desc *desc = irq_to_desc(irq);
 	unsigned long flags;
@@ -700,7 +700,7 @@ void irq_turn_off_timestamping(unsigned int irq, void *dev_id)
 
 	act = desc->action;
 	while (act) {
-		if (act->dev_id == dev_id) {
+		if (act->dev_id == (void *)dev_id) {
 			act->flags &= ~(IRQF_TIMESTAMP);
 		}
 		irqf_accu |= act->flags;
-- 
1.7.2.3


  parent reply	other threads:[~2011-03-21 11:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-21 11:59 [PATCH 1/5] RFC genirq: Add IRQ timestamping Torben Hohn
2011-03-21 11:59 ` [PATCH 2/5] RFC genirq: add function to retrieve timestamp from irqdesc Torben Hohn
2011-03-21 11:59 ` [PATCH 3/5] RFC genirq: save irq timestamps in void *dev_id Torben Hohn
2011-03-21 11:59 ` [PATCH 4/5] RFC genirq: allow dynamic switching of timestamping irqs Torben Hohn
2011-03-21 11:59 ` Torben Hohn [this message]
2011-03-21 12:43 ` [PATCH 1/5] RFC genirq: Add IRQ timestamping torbenh
2011-03-22  2:33 ` john stultz
2011-03-22 13:32   ` torbenh

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=1300708760-27910-5-git-send-email-torbenh@gmx.de \
    --to=torbenh@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxpps@ml.enneenne.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®