gpio: No need to cast away return value of debugfs_create_file()
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Jun 2019 15:50:45 +0000 (17:50 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 27 Jun 2019 14:56:52 +0000 (15:56 +0100)
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: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib.c

index 71cd685ed6c462b40975c1c0c2f3f1d448dc926e..12bd0f094abcbde546469877059394533ea6ee17 100644 (file)
@@ -4802,8 +4802,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);