linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] gpiolib: no need to cast away return value of debugfs_create_file()
@ 2019-06-18 15:50 Greg Kroah-Hartman
  2019-06-18 15:50 ` [PATCH 2/3] gpio: tegra: " Greg Kroah-Hartman
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Greg Kroah-Hartman @ 2019-06-18 15:50 UTC (permalink / raw)
  To: bamv2005, linus.walleij, bgolaszewski; +Cc: Greg Kroah-Hartman, linux-gpio

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


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

end of thread, other threads:[~2019-06-25 12:45 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-18 15:50 [PATCH 1/3] gpiolib: no need to cast away return value of debugfs_create_file() Greg Kroah-Hartman
2019-06-18 15:50 ` [PATCH 2/3] gpio: tegra: " 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

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).