public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] btrfs: drop unused memparse() parameter
@ 2023-12-05 11:13 David Disseldorp
  2023-12-05 12:48 ` Johannes Thumshirn
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: David Disseldorp @ 2023-12-05 11:13 UTC (permalink / raw)
  To: linux-btrfs; +Cc: David Disseldorp

The @retptr parameter for memparse() is optional.
btrfs_devinfo_scrub_speed_max_store() doesn't use it for any input
validation, so the parameter can be dropped.

Signed-off-by: David Disseldorp <ddiss@suse.de>
---
 fs/btrfs/sysfs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c
index e6b51fb3ddc1e..75f3b774a4d83 100644
--- a/fs/btrfs/sysfs.c
+++ b/fs/btrfs/sysfs.c
@@ -1779,10 +1779,9 @@ static ssize_t btrfs_devinfo_scrub_speed_max_store(struct kobject *kobj,
 {
 	struct btrfs_device *device = container_of(kobj, struct btrfs_device,
 						   devid_kobj);
-	char *endptr;
 	unsigned long long limit;
 
-	limit = memparse(buf, &endptr);
+	limit = memparse(buf, NULL);
 	WRITE_ONCE(device->scrub_speed_max, limit);
 	return len;
 }
-- 
2.35.3


^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2023-12-13 23:46 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-05 11:13 [PATCH] btrfs: drop unused memparse() parameter David Disseldorp
2023-12-05 12:48 ` Johannes Thumshirn
2023-12-05 14:22 ` David Sterba
2023-12-06  0:21   ` David Disseldorp
2023-12-06 18:53     ` David Sterba
2023-12-06 23:52       ` David Disseldorp
2023-12-07 13:55         ` David Sterba
2023-12-08  0:41           ` [PATCH] btrfs: validate scrub_speed_max sysfs string David Disseldorp
2023-12-11  3:18             ` Qu Wenruo
2023-12-11  3:56               ` David Disseldorp
2023-12-13 22:50               ` David Sterba
2023-12-13 22:52             ` David Sterba
2023-12-07  2:31 ` [PATCH] btrfs: drop unused memparse() parameter Qu Wenruo
2023-12-07 12:15   ` David Sterba
2023-12-07 19:56     ` Qu Wenruo
2023-12-13 23:15       ` David Sterba
2023-12-13 23:46         ` Qu Wenruo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox