From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [PATCH] mm: shrinkers: fix stream_open.cocci warnings
Date: Sat, 07 May 2022 16:34:52 +0800 [thread overview]
Message-ID: <YnYvLBOQOMcaTxNP@6ebe6cca1861> (raw)
In-Reply-To: <202205071632.qT7zlJoE-lkp@intel.com>
[-- Attachment #1: Type: text/plain, Size: 1347 bytes --]
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
TO: Roman Gushchin <guro@fb.com>
From: kernel test robot <lkp@intel.com>
mm/shrinker_debug.c:107: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: 12f77aac7ef2 ("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.3
head: 12f77aac7ef21be765e90bb8e0b611e6b9085256
commit: 12f77aac7ef21be765e90bb8e0b611e6b9085256 [7/7] mm: shrinkers: add scan interface for shrinker debugfs
:::::: branch date: 4 hours ago
:::::: commit date: 4 hours 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
@@ -104,7 +104,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-05-07 8:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 minmax.cocci warnings kernel test robot
2022-05-07 8:34 ` kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
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 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=YnYvLBOQOMcaTxNP@6ebe6cca1861 \
--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.