lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-32bb6cbb3b4ea5ca24e3fa13e11772c192616e04@git.kernel.org>
Date:   Wed, 21 Jun 2017 06:59:20 -0700
From:   tip-bot for Bartosz Golaszewski <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     brgl@...ev.pl, hpa@...or.com, linux-kernel@...r.kernel.org,
        marc.zyngier@....com, corbet@....net, tglx@...utronix.de,
        mingo@...nel.org
Subject: [tip:irq/core] irq/generic-chip: Provide irq_destroy_generic_chip()

Commit-ID:  32bb6cbb3b4ea5ca24e3fa13e11772c192616e04
Gitweb:     http://git.kernel.org/tip/32bb6cbb3b4ea5ca24e3fa13e11772c192616e04
Author:     Bartosz Golaszewski <brgl@...ev.pl>
AuthorDate: Wed, 31 May 2017 18:06:57 +0200
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Wed, 21 Jun 2017 15:53:10 +0200

irq/generic-chip: Provide irq_destroy_generic_chip()

Most users of irq_alloc_generic_chip() call irq_setup_generic_chip()
too. To simplify the cleanup provide a function that both removes a
generic chip and frees its memory.

Signed-off-by: Bartosz Golaszewski <brgl@...ev.pl>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Acked-by: Marc Zyngier <marc.zyngier@....com>
Cc: linux-doc@...r.kernel.org
Cc: Jonathan Corbet <corbet@....net>
Link: http://lkml.kernel.org/r/1496246820-13250-3-git-send-email-brgl@bgdev.pl

---
 include/linux/irq.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/include/linux/irq.h b/include/linux/irq.h
index 2c957fe..dc63aa1 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -979,6 +979,14 @@ static inline void irq_free_generic_chip(struct irq_chip_generic *gc)
 	kfree(gc);
 }
 
+static inline void irq_destroy_generic_chip(struct irq_chip_generic *gc,
+					    u32 msk, unsigned int clr,
+					    unsigned int set)
+{
+	irq_remove_generic_chip(gc, msk, clr, set);
+	irq_free_generic_chip(gc);
+}
+
 static inline struct irq_chip_type *irq_data_get_chip_type(struct irq_data *d)
 {
 	return container_of(d->chip, struct irq_chip_type, chip);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ