]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
util: Avoid needless preprocessor conditionals in virresctrl
authorMartin Kletzander <mkletzan@redhat.com>
Fri, 9 Feb 2018 06:32:33 +0000 (07:32 +0100)
committerMartin Kletzander <mkletzan@redhat.com>
Fri, 8 Jun 2018 08:28:46 +0000 (10:28 +0200)
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/util/virresctrl.c

index 9a118fc3595dd2169a129ef5a4a5149fc3d654cf..ca095293e57e4f66bbe2d670aa1641a973de4630 100644 (file)
@@ -380,8 +380,6 @@ virResctrlInfoIsEmpty(virResctrlInfoPtr resctrl)
 }
 
 
-#ifdef __linux__
-
 int
 virResctrlGetInfo(virResctrlInfoPtr resctrl)
 {
@@ -512,18 +510,6 @@ virResctrlGetInfo(virResctrlInfoPtr resctrl)
     return ret;
 }
 
-#else /* ! __linux__ */
-
-int
-virResctrlGetInfo(virResctrlInfoPtr resctrl ATTRIBUTE_UNUSED)
-{
-    virReportSystemError(ENOSYS, "%s",
-                         _("Cache tune not supported on this platform"));
-    return -1;
-}
-
-#endif /* ! __linux__ */
-
 
 int
 virResctrlInfoGetCache(virResctrlInfoPtr resctrl,
@@ -1089,8 +1075,6 @@ virResctrlAllocGetDefault(virResctrlInfoPtr resctrl)
 }
 
 
-#ifdef __linux__
-
 static void
 virResctrlAllocSubtractPerType(virResctrlAllocPerTypePtr dst,
                                virResctrlAllocPerTypePtr src)
@@ -1246,18 +1230,6 @@ virResctrlAllocGetUnused(virResctrlInfoPtr resctrl)
     goto cleanup;
 }
 
-#else /* ! __linux__ */
-
-virResctrlAllocPtr
-virResctrlAllocGetUnused(virResctrlInfoPtr resctrl ATTRIBUTE_UNUSED)
-{
-    virReportSystemError(ENOSYS, "%s",
-                         _("Cache tune not supported on this platform"));
-    return NULL;
-}
-
-#endif /* ! __linux__ */
-
 
 /*
  * Given the information about requested allocation type `a_type`, the host