param.no_movable is used to online memory in ZONE_NORMAL but param.no_online is used to not online memory. So it's unnecessary to check param.no_movable when param.no_online is set.
Signed-off-by: Xiao Yang <[email protected]> --- daxctl/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daxctl/device.c b/daxctl/device.c index 360ae8b..ba31eb6 100644 --- a/daxctl/device.c +++ b/daxctl/device.c @@ -711,7 +711,7 @@ static int reconfig_mode_system_ram(struct daxctl_dev *dev) const char *devname = daxctl_dev_get_devname(dev); int rc, skip_enable = 0; - if (param.no_online || !param.no_movable) { + if (param.no_online) { if (!param.force && daxctl_dev_will_auto_online_memory(dev)) { fprintf(stderr, "%s: error: kernel policy will auto-online memory, aborting\n", -- 2.40.1
