From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [PATCH] mm: shrinkers: fix stream_open.cocci warnings
Date: Fri, 03 Jun 2022 21:10:14 +0800 [thread overview]
Message-ID: <YpoINkpLW4WSG5QO@c8453bd35dbf> (raw)
In-Reply-To: <202206032155.W0MZ4A1a-lkp@intel.com>
[-- Attachment #1: Type: text/plain, Size: 1360 bytes --]
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
TO: Roman Gushchin <roman.gushchin@linux.dev>
From: kernel test robot <lkp@intel.com>
mm/shrinker_debug.c:105:8-24: WARNING: shrinker_debugfs_scan_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
Generated by: scripts/coccinelle/api/stream_open.cocci
Fixes: 44d87615ffe3 ("mm: shrinkers: add scan interface for shrinker debugfs")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---
tree: https://github.com/rgushchin/linux.git shrinker.5
head: be0b94668aac83e3bc04f73b06ad0b309bd51477
commit: 44d87615ffe3c376b23b6087b0b1fa02a3f86b62 [7/9] mm: shrinkers: add scan interface for shrinker debugfs
:::::: branch date: 15 hours ago
:::::: commit date: 2 days ago
Please take the patch only if it's a positive warning. Thanks!
mm/shrinker_debug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/mm/shrinker_debug.c
+++ b/mm/shrinker_debug.c
@@ -102,7 +102,7 @@ DEFINE_SHOW_ATTRIBUTE(shrinker_debugfs_c
static int shrinker_debugfs_scan_open(struct inode *inode, struct file *file)
{
file->private_data = inode->i_private;
- return nonseekable_open(inode, file);
+ return stream_open(inode, file);
}
static ssize_t shrinker_debugfs_scan_write(struct file *file,
next prev parent reply other threads:[~2022-06-03 13:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-03 13:11 [rgushchin:shrinker.5 7/9] mm/shrinker_debug.c:120:21-22: WARNING opportunity for min() kernel test robot
2022-06-03 13:10 ` [PATCH] mm: shrinkers: fix minmax.cocci warnings kernel test robot
2022-06-03 13:10 ` kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-05-07 8:46 [rgushchin:shrinker.3 7/7] mm/shrinker_debug.c:122:21-22: WARNING opportunity for min() kernel test robot
2022-05-07 8:34 ` [PATCH] mm: shrinkers: fix stream_open.cocci warnings kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YpoINkpLW4WSG5QO@c8453bd35dbf \
--to=lkp@intel.com \
--cc=kbuild@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.