[PATCH V2 15/19] selftests/resctrl: Change return type of umount_resctrlfs() to void

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



umount_resctrlfs() is used only during tear down path and there is nothing
much to do if unmount of resctrl file system fails, so, all the callers of
this function are not checking for the return value. Hence, change the
return type of this function from int to void.

Signed-off-by: Sai Praneeth Prakhya <sai.praneeth.prakhya@xxxxxxxxx>
---
 tools/testing/selftests/resctrl/resctrl.h   | 2 +-
 tools/testing/selftests/resctrl/resctrlfs.c | 9 ++-------
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/tools/testing/selftests/resctrl/resctrl.h b/tools/testing/selftests/resctrl/resctrl.h
index 65ca24bf3eac..23b691001f0b 100644
--- a/tools/testing/selftests/resctrl/resctrl.h
+++ b/tools/testing/selftests/resctrl/resctrl.h
@@ -76,7 +76,7 @@ bool check_resctrlfs_support(void);
 int filter_dmesg(void);
 int remount_resctrlfs(bool mum_resctrlfs);
 int get_resource_id(int cpu_no, int *resource_id);
-int umount_resctrlfs(void);
+void umount_resctrlfs(void);
 int validate_bw_report_request(char *bw_report);
 bool validate_resctrl_feature_request(const char *resctrl_val);
 char *fgrep(FILE *inf, const char *str);
diff --git a/tools/testing/selftests/resctrl/resctrlfs.c b/tools/testing/selftests/resctrl/resctrlfs.c
index 05956319d9ce..83cd3b026c52 100644
--- a/tools/testing/selftests/resctrl/resctrlfs.c
+++ b/tools/testing/selftests/resctrl/resctrlfs.c
@@ -90,15 +90,10 @@ int remount_resctrlfs(bool mum_resctrlfs)
 	return ret;
 }
 
-int umount_resctrlfs(void)
+void umount_resctrlfs(void)
 {
-	if (umount(RESCTRL_PATH)) {
+	if (umount(RESCTRL_PATH))
 		perror("# Unable to umount resctrl");
-
-		return errno;
-	}
-
-	return 0;
 }
 
 /*
-- 
2.19.1




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux