From: "tip-bot2 for Dmitry Antipov" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Dmitry Antipov <dmantipov@yandex.ru>,
"Borislav Petkov (AMD)" <bp@alien8.de>,
Reinette Chatre <reinette.chatre@intel.com>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: x86/cache] fs/resctrl: Simplify pseudo_lock_measure_trigger()
Date: Thu, 17 Sep 2026 21:26:19 -0000 [thread overview]
Message-ID: <178968037988.1720534.5384771268226600209.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20260821081128.19242-2-dmantipov@yandex.ru>
The following commit has been merged into the x86/cache branch of tip:
Commit-ID: a3f5e6eba41885dcffb635b54d6c4a18aa579cd5
Gitweb: https://git.kernel.org/tip/a3f5e6eba41885dcffb635b54d6c4a18aa579cd5
Author: Dmitry Antipov <dmantipov@yandex.ru>
AuthorDate: Fri, 21 Aug 2026 11:11:28 +03:00
Committer: Borislav Petkov (AMD) <bp@alien8.de>
CommitterDate: Thu, 17 Sep 2026 12:08:47 -07:00
fs/resctrl: Simplify pseudo_lock_measure_trigger()
Use convenient kstrtoint_from_user() to simplify pseudo_lock_measure_trigger().
No functional changes.
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Link: https://patch.msgid.link/20260821081128.19242-2-dmantipov@yandex.ru
---
fs/resctrl/pseudo_lock.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/fs/resctrl/pseudo_lock.c b/fs/resctrl/pseudo_lock.c
index dea2b4b..56ab63f 100644
--- a/fs/resctrl/pseudo_lock.c
+++ b/fs/resctrl/pseudo_lock.c
@@ -750,17 +750,10 @@ static ssize_t pseudo_lock_measure_trigger(struct file *file,
size_t count, loff_t *ppos)
{
struct rdtgroup *rdtgrp = file->private_data;
- size_t buf_size;
- char buf[32];
int ret;
int sel;
- buf_size = min(count, (sizeof(buf) - 1));
- if (copy_from_user(buf, user_buf, buf_size))
- return -EFAULT;
-
- buf[buf_size] = '\0';
- ret = kstrtoint(buf, 10, &sel);
+ ret = kstrtoint_from_user(user_buf, count, 10, &sel);
if (ret == 0) {
if (sel != 1 && sel != 2 && sel != 3)
return -EINVAL;
next prev parent reply other threads:[~2026-09-17 21:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-21 8:11 [PATCH v2 1/2] fs/resctrl: Avoid extra call to strlen() in schemata_list_add() Dmitry Antipov
2026-08-21 8:11 ` [PATCH v2 2/2] fs/resctrl: Simplify pseudo_lock_measure_trigger() Dmitry Antipov
2026-08-25 18:25 ` Reinette Chatre
2026-09-17 21:26 ` tip-bot2 for Dmitry Antipov [this message]
2026-08-25 18:25 ` [PATCH v2 1/2] fs/resctrl: Avoid extra call to strlen() in schemata_list_add() Reinette Chatre
2026-09-03 15:42 ` Reinette Chatre
2026-09-17 15:54 ` Borislav Petkov
2026-09-17 16:17 ` Reinette Chatre
2026-09-17 17:37 ` Borislav Petkov
2026-09-17 21:26 ` [tip: x86/cache] " tip-bot2 for Dmitry Antipov
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=178968037988.1720534.5384771268226600209.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=bp@alien8.de \
--cc=dmantipov@yandex.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=reinette.chatre@intel.com \
--cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®