Skip to contentSkip to conversation

daxctl: Remove unused memory_zone and mem_zone

PATCH In review Xiao Yang 3 participants 5 messages Aug 11, 2023 – Jan 17, 2024 libnvdimm: non-volatile memory device

lore
Share & tools
lore

Xiao Yang

author
#0 lore raw

PATCH v2 1/1 daxctl: Remove unused memory_zone and mem_zone

The enum memory_zone definition and mem_zone variable have never been used so remove them.

---
 daxctl/device.c | 11 -----------
 1 file changed, 11 deletions(-)
daxctl/device.c +0 -11
index d2d206b..8391343 100644
@@ -55,12 +55,6 @@ static unsigned long flags;
 static struct mapping *maps = NULL;
 static long long nmaps = -1;
 
-enum memory_zone {
-	MEM_ZONE_MOVABLE,
-	MEM_ZONE_NORMAL,
-};
-static enum memory_zone mem_zone = MEM_ZONE_MOVABLE;
-
 enum device_action {
 	ACTION_RECONFIG,
 	ACTION_ONLINE,
@@ -469,8 +463,6 @@ static const char *parse_device_options(int argc, const char **argv,
 				align = __parse_size64(param.align, &units);
 		} else if (strcmp(param.mode, "system-ram") == 0) {
 			reconfig_mode = DAXCTL_DEV_MODE_RAM;
-			if (param.no_movable)
-				mem_zone = MEM_ZONE_NORMAL;
 		} else if (strcmp(param.mode, "devdax") == 0) {
 			reconfig_mode = DAXCTL_DEV_MODE_DEVDAX;
 			if (param.no_online) {
@@ -494,9 +486,6 @@ static const char *parse_device_options(int argc, const char **argv,
 			align = __parse_size64(param.align, &units);
 		/* fall through */
 	case ACTION_ONLINE:
-		if (param.no_movable)
-			mem_zone = MEM_ZONE_NORMAL;
-		/* fall through */
 	case ACTION_DESTROY:
 	case ACTION_OFFLINE:
 	case ACTION_DISABLE:
Signature · 1 line
2.40.1
#1 lore raw

Ping. ^_^

-----Original Message-----
From: Xiao Yang <[email protected]>
Sent: 2023年8月11日 9:16
To: [email protected]; [email protected]; [email protected]
Cc: [email protected]; Yang, Xiao/杨 晓 <[email protected]>
Subject: [PATCH v2] daxctl: Remove unused memory_zone and mem_zone

The enum memory_zone definition and mem_zone variable have never been used so remove them.

---
 daxctl/device.c | 11 -----------
 1 file changed, 11 deletions(-)
daxctl/device.c +0 -11
@@ -55,12 +55,6 @@ static unsigned long flags;  static struct mapping *maps = NULL;  static long long nmaps = -1;
 
-enum memory_zone {
-	MEM_ZONE_MOVABLE,
-	MEM_ZONE_NORMAL,
-};
-static enum memory_zone mem_zone = MEM_ZONE_MOVABLE;
-
 enum device_action {
 	ACTION_RECONFIG,
 	ACTION_ONLINE,
@@ -469,8 +463,6 @@ static const char *parse_device_options(int argc, const char **argv,
 				align = __parse_size64(param.align, &units);
 		} else if (strcmp(param.mode, "system-ram") == 0) {
 			reconfig_mode = DAXCTL_DEV_MODE_RAM;
-			if (param.no_movable)
-				mem_zone = MEM_ZONE_NORMAL;
 		} else if (strcmp(param.mode, "devdax") == 0) {
 			reconfig_mode = DAXCTL_DEV_MODE_DEVDAX;
 			if (param.no_online) {
@@ -494,9 +486,6 @@ static const char *parse_device_options(int argc, const char **argv,
 			align = __parse_size64(param.align, &units);
 		/* fall through */
 	case ACTION_ONLINE:
-		if (param.no_movable)
-			mem_zone = MEM_ZONE_NORMAL;
-		/* fall through */
 	case ACTION_DESTROY:
 	case ACTION_OFFLINE:
 	case ACTION_DISABLE:

--
2.40.1

Reviewed-by
#2 lore raw
Quoted 10 lines · Xiao Yang (Fujitsu)

Ping. ^_^

-----Original Message-----
From: Xiao Yang <[email protected]>
Sent: 2023年8月11日 9:16
To: [email protected]; [email protected]; [email protected]
Cc: [email protected]; Yang, Xiao/杨 晓 <[email protected]>
Subject: [PATCH v2] daxctl: Remove unused memory_zone and mem_zone

The enum memory_zone definition and mem_zone variable have never been used so remove them.

NIT: I don't know that they have never been used but they certainly seem to have been moved to the library.

Quoted 2 lines
author
#3 lore raw

Hi All,

Kindly Ping.

Best Regards,
Xiao Yang

Quoted 19 lines · Ira Weiny
Quoted 10 lines · Xiao Yang (Fujitsu)

Ping. ^_^

-----Original Message-----
From: Xiao Yang <[email protected]>
Sent: 2023年8月11日 9:16
To: [email protected]; [email protected]; [email protected]
Cc: [email protected]; Yang, Xiao/杨 晓 <[email protected]>
Subject: [PATCH v2] daxctl: Remove unused memory_zone and mem_zone

The enum memory_zone definition and mem_zone variable have never been used so remove them.

NIT: I don't know that they have never been used but they certainly seem to have been moved to the library.

Quoted 2 lines