From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============7474396033089521080==" MIME-Version: 1.0 From: kernel test robot Subject: [PATCH] counter: fix stream_open.cocci warnings Date: Thu, 31 Dec 2020 10:29:31 +0800 Message-ID: <20201231022931.GA187605@12cfee2a1035> In-Reply-To: <202012311024.yv16Os9z-lkp@intel.com> List-Id: To: kbuild@lists.01.org --===============7474396033089521080== 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:319: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: a4ac03457672 ("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: bf76333d3e9172a0cf1d9dc2e02ea0a48a44a37f commit: a4ac0345767253ad4b7c9516d6a5babc70d275d9 [3/11] counter: Add charac= ter device interface :::::: branch date: 4 hours ago :::::: commit date: 7 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 @@ -316,7 +316,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) --===============7474396033089521080==--