[PATCH] i2c: fix stream_open.cocci warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: kbuild test robot <lkp@xxxxxxxxx>

drivers/i2c/i2c-pseudo.c:2206:1-17: ERROR: i2cp_fileops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.

Generated by: scripts/coccinelle/api/stream_open.cocci

CC: Matthew Blecker <matthewb@xxxxxxxxxxxx>
Signed-off-by: kbuild test robot <lkp@xxxxxxxxx>
---

url:    https://github.com/0day-ci/linux/commits/Matthew-Blecker/i2c-Add-i2c-pseudo-driver-for-userspace-I2C-adapters/20200509-011221
base:   https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next

Please take the patch only if it's a positive warning. Thanks!

 i2c-pseudo.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/i2c/i2c-pseudo.c
+++ b/drivers/i2c/i2c-pseudo.c
@@ -2203,7 +2203,7 @@ static int i2cp_cdev_open(struct inode *
 	this_pseudo = i2cp_device;
 
 	/* I2C pseudo adapter controllers are not seekable. */
-	nonseekable_open(inodep, filep);
+	stream_open(inodep, filep);
 	/* Refuse fsnotify events.  Modeled after /dev/ptmx implementation. */
 	filep->f_mode |= FMODE_NONOTIFY;
 



[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux