Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

platform/chrome: wilco_ec: convert stream-like files from nonseekable_open -> stream_open

Eliminate the following coccicheck warning:
./drivers/platform/chrome/wilco_ec/telemetry.c:259:1-17: WARNING:
telem_fops: .read() and .write() have stream semantic; safe to change
nonseekable_open -> stream_open.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/1612688918-63132-1-git-send-email-yang.lee@linux.alibaba.com

authored by

Yang Li and committed by
Enric Balletbo i Serra
dbc334fb a38fd874

+1 -1
+1 -1
drivers/platform/chrome/wilco_ec/telemetry.c
··· 256 256 sess_data->dev_data = dev_data; 257 257 sess_data->has_msg = false; 258 258 259 - nonseekable_open(inode, filp); 259 + stream_open(inode, filp); 260 260 filp->private_data = sess_data; 261 261 262 262 return 0;