From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============3216479897880460129==" MIME-Version: 1.0 From: kernel test robot Subject: [PATCH] counter: fix stream_open.cocci warnings Date: Mon, 14 Dec 2020 09:46:33 +0800 Message-ID: <20201214014633.GA10092@fe5aba91dd17> In-Reply-To: <202012140931.KJccbt92-lkp@intel.com> List-Id: To: kbuild@lists.01.org --===============3216479897880460129== 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:307: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: d698926a635b ("counter: Add character device interface") CC: William Breathitt Gray Reported-by: kernel test robot Signed-off-by: kernel test robot --- tree: https://github.com/dlech/linux bone-counter head: dc99d06b0f101cff0b3157b1cb49e28e95387c46 commit: d698926a635b0cf342b9b18e04b5f15701834158 [3/21] counter: Add charac= ter device interface :::::: branch date: 2 hours ago :::::: commit date: 6 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 @@ -304,7 +304,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) --===============3216479897880460129==--