Content-Type: multipart/mixed; boundary="===============4330619417866913512==" MIME-Version: 1.0 From: kbuild test robot To: kbuild-all@lists.01.org Subject: [PATCH] i2c: fix stream_open.cocci warnings Date: Sat, 09 May 2020 09:43:32 +0800 Message-ID: <20200509014331.GA22477@2b00b1f31741> In-Reply-To: <20200507230513.246804-2-matthewb@google.com> List-Id: --===============4330619417866913512== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: kbuild test robot drivers/i2c/i2c-pseudo.c:2206:1-17: ERROR: i2cp_fileops: .read() can deadlo= ck .write(); change nonseekable_open -> stream_open to fix. Generated by: scripts/coccinelle/api/stream_open.cocci CC: Matthew Blecker Signed-off-by: kbuild test robot --- url: https://github.com/0day-ci/linux/commits/Matthew-Blecker/i2c-Add-i2= c-pseudo-driver-for-userspace-I2C-adapters/20200509-011221 base: https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/f= or-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 =3D 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 |=3D FMODE_NONOTIFY; =20 --===============4330619417866913512==--