[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241209185624.2245158-2-usama.anjum@collabora.com>
Date: Mon, 9 Dec 2024 23:56:21 +0500
From: Muhammad Usama Anjum <usama.anjum@...labora.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
Shuah Khan <shuah@...nel.org>,
Ryan Roberts <ryan.roberts@....com>,
David Hildenbrand <david@...hat.com>,
linux-mm@...ck.org,
linux-kselftest@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Muhammad Usama Anjum <usama.anjum@...labora.com>,
kernel@...labora.com
Subject: [PATCH 1/4] selftests/mm: thp_settings: remove const from return type
Remove cost from the return type as it is ignored anyways and generates
the warning:
warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
Signed-off-by: Muhammad Usama Anjum <usama.anjum@...labora.com>
---
Optional fixes tag.
Fixes: 00679a183ac6 ("selftests/mm: factor out thp settings management")
Add fixes tag to last patch which had created these files instead of
original patch which added these.
---
tools/testing/selftests/mm/thp_settings.c | 4 ++--
tools/testing/selftests/mm/thp_settings.h | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/mm/thp_settings.c b/tools/testing/selftests/mm/thp_settings.c
index 577eaab6266fd..ad872af1c81aa 100644
--- a/tools/testing/selftests/mm/thp_settings.c
+++ b/tools/testing/selftests/mm/thp_settings.c
@@ -87,7 +87,7 @@ int write_file(const char *path, const char *buf, size_t buflen)
return (unsigned int) numwritten;
}
-const unsigned long read_num(const char *path)
+unsigned long read_num(const char *path)
{
char buf[21];
@@ -172,7 +172,7 @@ void thp_write_string(const char *name, const char *val)
}
}
-const unsigned long thp_read_num(const char *name)
+unsigned long thp_read_num(const char *name)
{
char path[PATH_MAX];
int ret;
diff --git a/tools/testing/selftests/mm/thp_settings.h b/tools/testing/selftests/mm/thp_settings.h
index 876235a23460c..fc131d23d5930 100644
--- a/tools/testing/selftests/mm/thp_settings.h
+++ b/tools/testing/selftests/mm/thp_settings.h
@@ -64,12 +64,12 @@ struct thp_settings {
int read_file(const char *path, char *buf, size_t buflen);
int write_file(const char *path, const char *buf, size_t buflen);
-const unsigned long read_num(const char *path);
+unsigned long read_num(const char *path);
void write_num(const char *path, unsigned long num);
int thp_read_string(const char *name, const char * const strings[]);
void thp_write_string(const char *name, const char *val);
-const unsigned long thp_read_num(const char *name);
+unsigned long thp_read_num(const char *name);
void thp_write_num(const char *name, unsigned long num);
void thp_write_settings(struct thp_settings *settings);
--
2.39.5
Powered by blists - more mailing lists