[libvirt] [PATCH 04/10] util: Avoid needless preprocessor conditionals in virresctrl

Ján Tomko jtomko at redhat.com
Thu Jun 7 22:23:04 UTC 2018


On Thu, Jun 07, 2018 at 03:54:25PM +0200, Martin Kletzander wrote:
>By exporting virResctrlAllocMasksAssign() we can remove most of the
>conditionals.  And that function should be used from the tests later anyway.
>

I fail to see the relevance of exporting virResctrlAllocMasksAssign in
this patch or series.

The conditionals removed here can be removed because the functions
do not contain Linux-specific code, the d_type access was removed by:
f2e16994f7d660a54daba1059441dc0dcf4d9cbd
    util: Don't check if entries under /sys/fs/resctrl/(info/) are directories


>Signed-off-by: Martin Kletzander <mkletzan at redhat.com>
>---
> src/libvirt_private.syms  |  1 +
> src/util/virresctrl.c     | 30 +-----------------------------
> src/util/virresctrlpriv.h |  4 ++++
> 3 files changed, 6 insertions(+), 29 deletions(-)
>

If you drop the virResctrlAllocMasksAssign-related hunks:

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180608/a492374e/attachment-0001.sig>


More information about the libvir-list mailing list