From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============4887539999002197056==" MIME-Version: 1.0 From: kernel test robot Subject: [PATCH] counter: fix stream_open.cocci warnings Date: Wed, 14 Oct 2020 13:41:52 +0800 Message-ID: <20201014054152.GA32165@e0420e1b216f> In-Reply-To: <202010141337.qnQytNoM-lkp@intel.com> List-Id: To: kbuild@lists.01.org --===============4887539999002197056== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable CC: kbuild-all(a)lists.01.org TO: William Breathitt Gray CC: David Lechner CC: linux-iio(a)vger.kernel.org CC: linux-kernel(a)vger.kernel.org From: kernel test robot drivers/counter/counter-chrdev.c:294: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 Fixes: c4408f814b1a ("counter: Add character device interface") CC: William Breathitt Gray Signed-off-by: kernel test robot --- tree: https://github.com/dlech/linux bone-counter head: f8f0ad10f30b5c1bea1a22f5de5dc9f2c6b7db1a commit: c4408f814b1a257c3854ec272e8348ef8fe55f48 [3/12] counter: Add charac= ter device interface :::::: branch date: 4 hours ago :::::: commit date: 2 days 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 @@ -291,7 +291,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) --===============4887539999002197056==--