From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============0637608585287377604==" MIME-Version: 1.0 From: kernel test robot Subject: [PATCH] counter: fix stream_open.cocci warnings Date: Tue, 13 Jul 2021 21:20:25 +0800 Message-ID: <20210713132025.GA3931@f74f7ebcdedf> In-Reply-To: <202107132146.N4qwZBh0-lkp@intel.com> List-Id: To: kbuild@lists.01.org --===============0637608585287377604== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable CC: kbuild-all(a)lists.01.org In-Reply-To: References: TO: William Breathitt Gray From: kernel test robot drivers/counter/counter-chrdev.c:342:8-24: WARNING: counter_fops: .read() h= as stream semantic; safe to change nonseekable_open -> stream_open. Generated by: scripts/coccinelle/api/stream_open.cocci CC: William Breathitt Gray Reported-by: kernel test robot Signed-off-by: kernel test robot --- url: https://github.com/0day-ci/linux/commits/William-Breathitt-Gray/Int= roduce-the-Counter-character-device-interface/20210713-175710 base: 50be9417e23af5a8ac860d998e1e3f06b8fd79d7 :::::: branch date: 3 hours ago :::::: commit date: 3 hours ago Please take the patch only if it's a positive warning. Thanks! counter-chrdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/counter/counter-chrdev.c +++ b/drivers/counter/counter-chrdev.c @@ -339,7 +339,7 @@ static int counter_chrdev_open(struct in get_device(&counter->dev); filp->private_data =3D counter; = - return nonseekable_open(inode, filp); + return stream_open(inode, filp); } = static int counter_chrdev_release(struct inode *inode, struct file *filp) --===============0637608585287377604==--