From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: bamv2005@gmail.com, linus.walleij@linaro.org, bgolaszewski@baylibre.com
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-gpio@vger.kernel.org
Subject: [PATCH 1/3] gpiolib: no need to cast away return value of debugfs_create_file()
Date: Tue, 18 Jun 2019 17:50:45 +0200 [thread overview]
Message-ID: <20190618155047.16894-1-gregkh@linuxfoundation.org> (raw)
It is fine to ignore the return value (and encouraged), so need to cast
away the return value, you will not get a build warning at all.
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpio/gpiolib.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index e013d417a936..d378774d3456 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -4805,8 +4805,8 @@ static const struct file_operations gpiolib_operations = {
static int __init gpiolib_debugfs_init(void)
{
/* /sys/kernel/debug/gpio */
- (void) debugfs_create_file("gpio", S_IFREG | S_IRUGO,
- NULL, NULL, &gpiolib_operations);
+ debugfs_create_file("gpio", S_IFREG | S_IRUGO, NULL, NULL,
+ &gpiolib_operations);
return 0;
}
subsys_initcall(gpiolib_debugfs_init);
--
2.22.0
next reply other threads:[~2019-06-18 15:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-18 15:50 Greg Kroah-Hartman [this message]
2019-06-18 15:50 ` [PATCH 2/3] gpio: tegra: no need to cast away return value of debugfs_create_file() Greg Kroah-Hartman
2019-06-18 16:26 ` Jon Hunter
2019-06-18 17:17 ` Greg Kroah-Hartman
2019-06-18 17:49 ` Jon Hunter
2019-06-18 18:05 ` Greg Kroah-Hartman
2019-06-19 8:19 ` Thierry Reding
2019-06-25 12:45 ` Linus Walleij
2019-06-18 15:50 ` [PATCH 3/3] gpio: mockup: no need to check return value of debugfs_create functions Greg Kroah-Hartman
2019-06-20 7:25 ` [PATCH v2] " Greg Kroah-Hartman
2019-06-24 8:20 ` Bartosz Golaszewski
2019-06-25 12:29 ` [PATCH 1/3] gpiolib: no need to cast away return value of debugfs_create_file() 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=20190618155047.16894-1-gregkh@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=bamv2005@gmail.com \
--cc=bgolaszewski@baylibre.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@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 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.