diff mbox series

[1/4] selftests/mm: thp_settings: remove const from return type

Message ID 20241209185624.2245158-2-usama.anjum@collabora.com
State New
Headers show
Series selftest/mm: Remove warnings found by adding compiler flags | expand

Commit Message

Muhammad Usama Anjum Dec. 9, 2024, 6:56 p.m. UTC
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@collabora.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 mbox series

Patch

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);