From: Martin Kletzander Date: Fri, 9 Feb 2018 06:32:33 +0000 (+0100) Subject: util: Avoid needless preprocessor conditionals in virresctrl X-Git-Tag: v4.5.0-rc1~185 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3593d36c3399c2d990b2db95d81452af8bc7cd6d;p=thirdparty%2Flibvirt.git util: Avoid needless preprocessor conditionals in virresctrl Signed-off-by: Martin Kletzander Reviewed-by: Ján Tomko --- diff --git a/src/util/virresctrl.c b/src/util/virresctrl.c index 9a118fc359..ca095293e5 100644 --- a/src/util/virresctrl.c +++ b/src/util/virresctrl.c @@ -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