linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] kernel: irq: add releases() notation
@ 2019-12-16 14:42 Jules Irenge
  2019-12-16 14:42 ` [PATCH 2/2] kernel: irq: add must_hold() annotation Jules Irenge
  2020-01-09 17:10 ` [tip: irq/core] genirq: Add missing __releases() " tip-bot2 for Jules Irenge
  0 siblings, 2 replies; 4+ messages in thread
From: Jules Irenge @ 2019-12-16 14:42 UTC (permalink / raw)
  To: boqun.feng; +Cc: tglx, maz, linux-kernel, Jules Irenge

Add releases() notation to remove issue detected by sparse tool.
 warning: context imbalance in __irq_put_desc_unlock() - unexpected unlock

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
 kernel/irq/irqdesc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
index 5b8fdd659e54..98a5f10d1900 100644
--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -891,6 +891,7 @@ __irq_get_desc_lock(unsigned int irq, unsigned long *flags, bool bus,
 }
 
 void __irq_put_desc_unlock(struct irq_desc *desc, unsigned long flags, bool bus)
+	__releases(&desc->lock)
 {
 	raw_spin_unlock_irqrestore(&desc->lock, flags);
 	if (bus)
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] kernel: irq: add must_hold() annotation
  2019-12-16 14:42 [PATCH 1/2] kernel: irq: add releases() notation Jules Irenge
@ 2019-12-16 14:42 ` Jules Irenge
  2020-01-09 17:10   ` [tip: irq/core] genirq: Add missing __must_hold() sparse annotation tip-bot2 for Jules Irenge
  2020-01-09 17:10 ` [tip: irq/core] genirq: Add missing __releases() " tip-bot2 for Jules Irenge
  1 sibling, 1 reply; 4+ messages in thread
From: Jules Irenge @ 2019-12-16 14:42 UTC (permalink / raw)
  To: boqun.feng; +Cc: tglx, maz, linux-kernel, Jules Irenge

Add __must_hold() annotation to remove issue detected by sparse tool.
warning: context imbalance in irq_wait_for_poll - unexpected unlock

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
 kernel/irq/spurious.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c
index 2ed97a7c9b2a..f865e5f4d382 100644
--- a/kernel/irq/spurious.c
+++ b/kernel/irq/spurious.c
@@ -34,6 +34,7 @@ static atomic_t irq_poll_active;
  * true and let the handler run.
  */
 bool irq_wait_for_poll(struct irq_desc *desc)
+	__must_hold(&desc->lock)
 {
 	if (WARN_ONCE(irq_poll_cpu == smp_processor_id(),
 		      "irq poll in progress on cpu %d for irq %d\n",
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [tip: irq/core] genirq: Add missing __must_hold() sparse annotation
  2019-12-16 14:42 ` [PATCH 2/2] kernel: irq: add must_hold() annotation Jules Irenge
@ 2020-01-09 17:10   ` tip-bot2 for Jules Irenge
  0 siblings, 0 replies; 4+ messages in thread
From: tip-bot2 for Jules Irenge @ 2020-01-09 17:10 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Jules Irenge, Thomas Gleixner, x86, LKML

The following commit has been merged into the irq/core branch of tip:

Commit-ID:     099368bb10c0e340f0b236b169e8b13235e0907c
Gitweb:        https://git.kernel.org/tip/099368bb10c0e340f0b236b169e8b13235e0907c
Author:        Jules Irenge <jbi.octave@gmail.com>
AuthorDate:    Mon, 16 Dec 2019 14:42:08 
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Thu, 09 Jan 2020 18:03:37 +01:00

genirq: Add missing __must_hold() sparse annotation

Add __must_hold() annotation to address the following sparse warning:

  warning: context imbalance in irq_wait_for_poll - unexpected unlock

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20191216144208.29852-2-jbi.octave@gmail.com
---
 kernel/irq/spurious.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c
index 2ed97a7..f865e5f 100644
--- a/kernel/irq/spurious.c
+++ b/kernel/irq/spurious.c
@@ -34,6 +34,7 @@ static atomic_t irq_poll_active;
  * true and let the handler run.
  */
 bool irq_wait_for_poll(struct irq_desc *desc)
+	__must_hold(&desc->lock)
 {
 	if (WARN_ONCE(irq_poll_cpu == smp_processor_id(),
 		      "irq poll in progress on cpu %d for irq %d\n",

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [tip: irq/core] genirq: Add missing __releases() sparse annotation
  2019-12-16 14:42 [PATCH 1/2] kernel: irq: add releases() notation Jules Irenge
  2019-12-16 14:42 ` [PATCH 2/2] kernel: irq: add must_hold() annotation Jules Irenge
@ 2020-01-09 17:10 ` tip-bot2 for Jules Irenge
  1 sibling, 0 replies; 4+ messages in thread
From: tip-bot2 for Jules Irenge @ 2020-01-09 17:10 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Jules Irenge, Thomas Gleixner, x86, LKML

The following commit has been merged into the irq/core branch of tip:

Commit-ID:     8b3b54799b99de59d25a3947d539662f47300ced
Gitweb:        https://git.kernel.org/tip/8b3b54799b99de59d25a3947d539662f47300ced
Author:        Jules Irenge <jbi.octave@gmail.com>
AuthorDate:    Mon, 16 Dec 2019 14:42:07 
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Thu, 09 Jan 2020 18:03:24 +01:00

genirq: Add missing __releases() sparse annotation

Add __releases() annotation to address the following sparse warning:

  warning: context imbalance in __irq_put_desc_unlock() - unexpected unlock

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20191216144208.29852-1-jbi.octave@gmail.com

---
 kernel/irq/irqdesc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
index 5b8fdd6..98a5f10 100644
--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -891,6 +891,7 @@ __irq_get_desc_lock(unsigned int irq, unsigned long *flags, bool bus,
 }
 
 void __irq_put_desc_unlock(struct irq_desc *desc, unsigned long flags, bool bus)
+	__releases(&desc->lock)
 {
 	raw_spin_unlock_irqrestore(&desc->lock, flags);
 	if (bus)

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-01-09 17:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-16 14:42 [PATCH 1/2] kernel: irq: add releases() notation Jules Irenge
2019-12-16 14:42 ` [PATCH 2/2] kernel: irq: add must_hold() annotation Jules Irenge
2020-01-09 17:10   ` [tip: irq/core] genirq: Add missing __must_hold() sparse annotation tip-bot2 for Jules Irenge
2020-01-09 17:10 ` [tip: irq/core] genirq: Add missing __releases() " tip-bot2 for Jules Irenge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).