From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Linus Walleij <linus.walleij@linaro.org>,
David Cohen <david.a.cohen@intel.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
linux-kernel@vger.kernel.org
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v3 1/5] gpio-langwell: initialize lock before usage
Date: Wed, 22 May 2013 13:20:10 +0300 [thread overview]
Message-ID: <1369218014-28990-2-git-send-email-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <1369218014-28990-1-git-send-email-andriy.shevchenko@linux.intel.com>
Otherwise we will end up with traceback from LOCKDEP:
INFO: trying to register non-static key.
the code is fine but needs lockdep annotation.
turning off the locking correctness validator.
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.10.0-rc2-next-20130521-00028-g09aa9fc #487
00000000 00000000 f6c55c54 c1541fe4 f6040bf8 f6c55c8c c1069ef1 c1726bc1
c1726cc8 c1726c9e 00000000 f6c584e0 f6c58000 f6c55ce8 00000000 f6040bf8
f6040bf8 00000046 f6c58000 f6c55d00 c106a18d 00000a2b 00000003 00004f02
Call Trace:
[<c1541fe4>] dump_stack+0x49/0x77
[<c1069ef1>] register_lock_class+0x58/0x260
[<c106a18d>] __lock_acquire+0x94/0xcff
[<c106adc8>] ? __lock_acquire+0xccf/0xcff
[<c106b2ad>] lock_acquire+0xcc/0x10d
[<c1269c7c>] ? lnw_irq_type+0x63/0xe9
[<c1545da0>] _raw_spin_lock_irqsave+0x32/0x42
[<c1269c7c>] ? lnw_irq_type+0x63/0xe9
[<c1269c7c>] lnw_irq_type+0x63/0xe9
[<c108f454>] __irq_set_trigger+0x98/0x123
[<c1090225>] irq_set_irq_type+0x2f/0x51
[<c1090225>] ? irq_set_irq_type+0x2f/0x51
[<c1269d02>] ? lnw_irq_type+0xe9/0xe9
[<c1269d34>] lnw_gpio_irq_map+0x32/0x3b
[<c10914f2>] irq_domain_add_legacy+0xe2/0x107
[<c1091b53>] irq_domain_add_simple+0x47/0x60
[<c1269f6e>] lnw_gpio_probe+0x119/0x217
[<c1271018>] pci_device_probe+0x5a/0x92
...
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
---
drivers/gpio/gpio-langwell.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpio/gpio-langwell.c b/drivers/gpio/gpio-langwell.c
index 62ef10a..c1f33dd 100644
--- a/drivers/gpio/gpio-langwell.c
+++ b/drivers/gpio/gpio-langwell.c
@@ -380,6 +380,8 @@ static int lnw_gpio_probe(struct pci_dev *pdev,
lnw->chip.can_sleep = 0;
lnw->pdev = pdev;
+ spin_lock_init(&lnw->lock);
+
lnw->domain = irq_domain_add_simple(pdev->dev.of_node, ngpio, irq_base,
&lnw_gpio_irq_ops, lnw);
if (!lnw->domain) {
@@ -399,8 +401,6 @@ static int lnw_gpio_probe(struct pci_dev *pdev,
irq_set_handler_data(pdev->irq, lnw);
irq_set_chained_handler(pdev->irq, lnw_irq_handler);
- spin_lock_init(&lnw->lock);
-
pm_runtime_put_noidle(&pdev->dev);
pm_runtime_allow(&pdev->dev);
--
1.8.2.rc0.22.gb3600c3
next prev parent reply other threads:[~2013-05-22 10:21 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-22 10:20 [PATCH v3 0/5] gpio-langwell: bugfix and amendments Andy Shevchenko
2013-05-22 10:20 ` Andy Shevchenko [this message]
2013-05-30 17:20 ` [PATCH v3 1/5] gpio-langwell: initialize lock before usage Linus Walleij
2013-05-31 12:01 ` Linus Walleij
2013-05-31 14:03 ` Andy Shevchenko
2013-05-22 10:20 ` [PATCH v3 2/5] gpio-langwell: do not use direct access to iomapped memory Andy Shevchenko
2013-05-30 17:21 ` Linus Walleij
2013-05-22 10:20 ` [PATCH v3 3/5] gpio-langwell: use managed functions pcim_* and devm_* Andy Shevchenko
2013-05-22 11:06 ` Mika Westerberg
2013-05-30 17:25 ` Linus Walleij
2013-05-31 7:57 ` Andy Shevchenko
2013-05-22 10:20 ` [PATCH v3 4/5] gpio-langwell: amend error messages Andy Shevchenko
2013-05-30 17:27 ` Linus Walleij
2013-05-22 10:20 ` [PATCH v3 5/5] gpio-langwell: drop away explicit casting Andy Shevchenko
2013-05-22 11:07 ` Mika Westerberg
2013-05-30 17:28 ` Linus Walleij
2013-05-22 16:28 ` [PATCH v3 0/5] gpio-langwell: bugfix and amendments David Cohen
2013-05-28 8:05 ` Andy Shevchenko
2013-05-30 17:30 ` Linus Walleij
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=1369218014-28990-2-git-send-email-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=david.a.cohen@intel.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
/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.