From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============0543926071211086423==" MIME-Version: 1.0 From: kernel test robot Subject: [PATCH] counter: fix stream_open.cocci warnings Date: Sat, 09 Oct 2021 12:45:14 +0800 Message-ID: <20211009044514.GA61142@a80f3d99b3de> In-Reply-To: <202110091201.YySc9hRA-lkp@intel.com> List-Id: To: kbuild@lists.01.org --===============0543926071211086423== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable CC: kbuild-all(a)lists.01.org CC: Linux Memory Management List TO: William Breathitt Gray CC: Jonathan Cameron CC: linux-iio(a)vger.kernel.org CC: linux-kernel(a)vger.kernel.org From: kernel test robot drivers/counter/counter-chrdev.c:394: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: 6877f0924e38 ("counter: Add character device interface") CC: William Breathitt Gray Reported-by: kernel test robot Signed-off-by: kernel test robot --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git= master head: 683f29b781aeaab6bf302eeb2ef08a5e5f9d8a27 commit: 6877f0924e38f95da76cdac254121acbbdbaeacb [4784/6929] counter: Add c= haracter device interface :::::: branch date: 22 hours ago :::::: commit date: 7 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 @@ -391,7 +391,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) --===============0543926071211086423==--