From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Bartosz Golaszewski <brgl@bgdev.pl>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Linus Walleij <linus.walleij@linaro.org>
Subject: [PATCH v1 3/3] gpiolib: Move error message out of a spinlock
Date: Wed, 30 Mar 2022 17:59:10 +0300 [thread overview]
Message-ID: <20220330145910.1946-3-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20220330145910.1946-1-andriy.shevchenko@linux.intel.com>
An error path is a slow path, no need to block other CPUs
when printing error messages.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/gpio/gpiolib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index f956c533f218..062d127d9a0d 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -289,7 +289,6 @@ static int gpiodev_add_to_list(struct gpio_device *gdev)
}
}
- dev_err(&gdev->dev, "GPIO integer space overlap, cannot add chip\n");
return -EBUSY;
}
@@ -724,6 +723,7 @@ int gpiochip_add_data_with_key(struct gpio_chip *gc, void *data,
ret = gpiodev_add_to_list(gdev);
if (ret) {
spin_unlock_irqrestore(&gpio_lock, flags);
+ chip_err(gc, "GPIO integer space overlap, cannot add chip\n");
goto err_free_label;
}
--
2.35.1
next prev parent reply other threads:[~2022-03-30 14:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-30 14:59 [PATCH v1 1/3] gpiolib: Split out for_each_gpio_desc() macro Andy Shevchenko
2022-03-30 14:59 ` [PATCH v1 2/3] gpiolib: Refactor gpiolib_dbg_show() with help of for_each_gpio_desc() Andy Shevchenko
2022-03-30 14:59 ` Andy Shevchenko [this message]
2022-04-09 20:36 ` [PATCH v1 3/3] gpiolib: Move error message out of a spinlock Bartosz Golaszewski
2022-04-05 12:21 ` [PATCH v1 1/3] gpiolib: Split out for_each_gpio_desc() macro Bartosz Golaszewski
2022-04-05 14:55 ` Andy Shevchenko
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=20220330145910.1946-3-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=brgl@bgdev.pl \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).