[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220505115011.3435-1-hanyihao@vivo.com>
Date: Thu, 5 May 2022 04:50:11 -0700
From: Yihao Han <hanyihao@...o.com>
To: Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>,
linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: kernel@...o.com, Yihao Han <hanyihao@...o.com>
Subject: [PATCH] gpiolib: cdev: fix stream_open.cocci warnings
./drivers/gpio/gpiolib-cdev.c:2498:7-23: WARNING:
gpio_fileops: .read() has stream semantic;
safe to change nonseekable_open -> stream_open.
Generated by: scripts/coccinelle/api/stream_open.cocci
Signed-off-by: Yihao Han <hanyihao@...o.com>
---
drivers/gpio/gpiolib-cdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/gpiolib-cdev.c b/drivers/gpio/gpiolib-cdev.c
index f5aa5f93342a..d03c8e012c8c 100644
--- a/drivers/gpio/gpiolib-cdev.c
+++ b/drivers/gpio/gpiolib-cdev.c
@@ -2495,7 +2495,7 @@ static int gpio_chrdev_open(struct inode *inode, struct file *file)
get_device(&gdev->dev);
file->private_data = cdev;
- ret = nonseekable_open(inode, file);
+ ret = stream_open(inode, file);
if (ret)
goto out_unregister_notifier;
--
2.17.1
Powered by blists - more mailing lists