Skip to contentSkip to conversation

ndctl: fix ABI breakage due to rename of fw_info_get_updated_version

PATCH In review Vishal Verma 2 participants 2 messages Apr 23, 2018 libnvdimm: non-volatile memory device

lore
Share & tools
lore

Vishal Verma

author maintainer
#0 lore raw

PATCH 1/1 ndctl: fix ABI breakage due to rename of fw_info_get_updated_version

Commit 47ad9f830f42 ("ndctl: add option to list firmware information for a DIMM") renamed ndctl_cmd_fw_info_get_updated_version to ...get_next_version, which causes an ABI breakage, since the former has appeared in a released ndctl. Fix by renaming it back to the original.

Fixes commit 47ad9f830f42 ("ndctl: add option to list firmware information for a DIMM")
Cc Dave Jiang <[email protected]>
Cc Dan Williams <[email protected]>
---
 ndctl/lib/firmware.c       | 2 +-
 ndctl/lib/intel.c          | 4 ++--
 ndctl/lib/libndctl.sym     | 2 +-
 ndctl/lib/private.h        | 2 +-
 ndctl/libndctl.h           | 2 +-
 ndctl/util/json-firmware.c | 2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)
ndctl/lib/firmware.c +1 -1
index 277b539..a5dd006 100644
@@ -93,7 +93,7 @@ firmware_cmd_op(fw_info_get_max_send_len, unsigned int, 0)
 firmware_cmd_op(fw_info_get_query_interval, unsigned int, 0)
 firmware_cmd_op(fw_info_get_max_query_time, unsigned int, 0)
 firmware_cmd_op(fw_info_get_run_version, unsigned long long, 0)
-firmware_cmd_op(fw_info_get_next_version, unsigned long long, 0)
+firmware_cmd_op(fw_info_get_updated_version, unsigned long long, 0)
 firmware_cmd_op(fw_start_get_context, unsigned int, 0)
 firmware_cmd_op(fw_fquery_get_fw_rev, unsigned long long, 0)
 
ndctl/lib/intel.c +2 -2
index ba210e1..49a4360 100644
@@ -434,7 +434,7 @@ intel_fw_info_get_field32(cmd, query_interval)
 intel_fw_info_get_field32(cmd, max_query_time);
 intel_fw_info_get_field64(cmd, run_version);
 
-static unsigned long long intel_cmd_fw_info_get_next_version(
+static unsigned long long intel_cmd_fw_info_get_updated_version(
 		struct ndctl_cmd *cmd)
 {
 	if (intel_fw_get_info_valid(cmd) < 0)
@@ -720,7 +720,7 @@ struct ndctl_dimm_ops * const intel_dimm_ops = &(struct ndctl_dimm_ops) {
 	.fw_info_get_query_interval = intel_cmd_fw_info_get_query_interval,
 	.fw_info_get_max_query_time = intel_cmd_fw_info_get_max_query_time,
 	.fw_info_get_run_version = intel_cmd_fw_info_get_run_version,
-	.fw_info_get_next_version = intel_cmd_fw_info_get_next_version,
+	.fw_info_get_updated_version = intel_cmd_fw_info_get_updated_version,
 	.new_fw_start_update = intel_dimm_cmd_new_fw_start,
 	.fw_start_get_context = intel_cmd_fw_start_get_context,
 	.new_fw_send = intel_dimm_cmd_new_fw_send,
ndctl/lib/libndctl.sym +1 -1
index df17c3e..65e735f 100644
@@ -339,6 +339,7 @@ global:
 	ndctl_cmd_fw_info_get_query_interval;
 	ndctl_cmd_fw_info_get_max_query_time;
 	ndctl_cmd_fw_info_get_run_version;
+	ndctl_cmd_fw_info_get_updated_version;
 	ndctl_cmd_fw_start_get_context;
 	ndctl_cmd_fw_fquery_get_fw_rev;
 	ndctl_cmd_fw_xlat_firmware_status;
@@ -346,7 +347,6 @@ global:
 
 LIBNDCTL_15 {
 global:
-	ndctl_cmd_fw_info_get_next_version;
 	ndctl_dimm_cmd_new_ack_shutdown_count;
 	ndctl_region_get_numa_node;
 	ndctl_dimm_fw_update_supported;
ndctl/lib/private.h +1 -1
index 1cad06b..73bbeed 100644
@@ -314,7 +314,7 @@ struct ndctl_dimm_ops {
 	unsigned int (*fw_info_get_query_interval)(struct ndctl_cmd *);
 	unsigned int (*fw_info_get_max_query_time)(struct ndctl_cmd *);
 	unsigned long long (*fw_info_get_run_version)(struct ndctl_cmd *);
-	unsigned long long (*fw_info_get_next_version)(struct ndctl_cmd *);
+	unsigned long long (*fw_info_get_updated_version)(struct ndctl_cmd *);
 	struct ndctl_cmd *(*new_fw_start_update)(struct ndctl_dimm *);
 	unsigned int (*fw_start_get_context)(struct ndctl_cmd *);
 	struct ndctl_cmd *(*new_fw_send)(struct ndctl_cmd *,
ndctl/libndctl.h +1 -1
index 10b423f..498ae19 100644
@@ -640,7 +640,7 @@ unsigned int ndctl_cmd_fw_info_get_max_send_len(struct ndctl_cmd *cmd);
 unsigned int ndctl_cmd_fw_info_get_query_interval(struct ndctl_cmd *cmd);
 unsigned int ndctl_cmd_fw_info_get_max_query_time(struct ndctl_cmd *cmd);
 unsigned long long ndctl_cmd_fw_info_get_run_version(struct ndctl_cmd *cmd);
-unsigned long long ndctl_cmd_fw_info_get_next_version(struct ndctl_cmd *cmd);
+unsigned long long ndctl_cmd_fw_info_get_updated_version(struct ndctl_cmd *cmd);
 unsigned int ndctl_cmd_fw_start_get_context(struct ndctl_cmd *cmd);
 unsigned long long ndctl_cmd_fw_fquery_get_fw_rev(struct ndctl_cmd *cmd);
 enum ND_FW_STATUS ndctl_cmd_fw_xlat_firmware_status(struct ndctl_cmd *cmd);
ndctl/util/json-firmware.c +1 -1
index e595e2f..118424f 100644
@@ -46,7 +46,7 @@ struct json_object *util_dimm_firmware_to_json(struct ndctl_dimm *dimm,
 	if (jobj)
 		json_object_object_add(jfirmware, "current_version", jobj);
 
-	next = ndctl_cmd_fw_info_get_next_version(cmd);
+	next = ndctl_cmd_fw_info_get_updated_version(cmd);
 	if (next == ULLONG_MAX) {
 		jobj = util_json_object_hex(-1, flags);
 		if (jobj)
Signature · 6 lines
2.14.3

_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Vishal Verma

Commit 47ad9f830f42 ("ndctl: add option to list firmware information for a DIMM") renamed ndctl_cmd_fw_info_get_updated_version to ...get_next_version, which causes an ABI breakage, since the former has appeared in a released ndctl. Fix by renaming it back to the original.

Fixes commit 47ad9f830f42 ("ndctl: add option to list firmware information for a DIMM")
Cc Dave Jiang <[email protected]>
Cc Dan Williams <[email protected]>

Thanks Vishal!

Quoted 96 lines
---
 ndctl/lib/firmware.c       | 2 +-
 ndctl/lib/intel.c          | 4 ++--
 ndctl/lib/libndctl.sym     | 2 +-
 ndctl/lib/private.h        | 2 +-
 ndctl/libndctl.h           | 2 +-
 ndctl/util/json-firmware.c | 2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)
ndctl/lib/firmware.c +1 -1
index 277b539..a5dd006 100644
@@ -93,7 +93,7 @@ firmware_cmd_op(fw_info_get_max_send_len, unsigned int, 0)
 firmware_cmd_op(fw_info_get_query_interval, unsigned int, 0)
 firmware_cmd_op(fw_info_get_max_query_time, unsigned int, 0)
 firmware_cmd_op(fw_info_get_run_version, unsigned long long, 0)
-firmware_cmd_op(fw_info_get_next_version, unsigned long long, 0)
+firmware_cmd_op(fw_info_get_updated_version, unsigned long long, 0)
 firmware_cmd_op(fw_start_get_context, unsigned int, 0)
 firmware_cmd_op(fw_fquery_get_fw_rev, unsigned long long, 0)
 
ndctl/lib/intel.c +2 -2
index ba210e1..49a4360 100644
@@ -434,7 +434,7 @@ intel_fw_info_get_field32(cmd, query_interval)
 intel_fw_info_get_field32(cmd, max_query_time);
 intel_fw_info_get_field64(cmd, run_version);
 
-static unsigned long long intel_cmd_fw_info_get_next_version(
+static unsigned long long intel_cmd_fw_info_get_updated_version(
 		struct ndctl_cmd *cmd)
 {
 	if (intel_fw_get_info_valid(cmd) < 0)
@@ -720,7 +720,7 @@ struct ndctl_dimm_ops * const intel_dimm_ops = &(struct ndctl_dimm_ops) {
 	.fw_info_get_query_interval = intel_cmd_fw_info_get_query_interval,
 	.fw_info_get_max_query_time = intel_cmd_fw_info_get_max_query_time,
 	.fw_info_get_run_version = intel_cmd_fw_info_get_run_version,
-	.fw_info_get_next_version = intel_cmd_fw_info_get_next_version,
+	.fw_info_get_updated_version = intel_cmd_fw_info_get_updated_version,
 	.new_fw_start_update = intel_dimm_cmd_new_fw_start,
 	.fw_start_get_context = intel_cmd_fw_start_get_context,
 	.new_fw_send = intel_dimm_cmd_new_fw_send,
ndctl/lib/libndctl.sym +1 -1
index df17c3e..65e735f 100644
@@ -339,6 +339,7 @@ global:
 	ndctl_cmd_fw_info_get_query_interval;
 	ndctl_cmd_fw_info_get_max_query_time;
 	ndctl_cmd_fw_info_get_run_version;
+	ndctl_cmd_fw_info_get_updated_version;
 	ndctl_cmd_fw_start_get_context;
 	ndctl_cmd_fw_fquery_get_fw_rev;
 	ndctl_cmd_fw_xlat_firmware_status;
@@ -346,7 +347,6 @@ global:
 
 LIBNDCTL_15 {
 global:
-	ndctl_cmd_fw_info_get_next_version;
 	ndctl_dimm_cmd_new_ack_shutdown_count;
 	ndctl_region_get_numa_node;
 	ndctl_dimm_fw_update_supported;
ndctl/lib/private.h +1 -1
index 1cad06b..73bbeed 100644
@@ -314,7 +314,7 @@ struct ndctl_dimm_ops {
 	unsigned int (*fw_info_get_query_interval)(struct ndctl_cmd *);
 	unsigned int (*fw_info_get_max_query_time)(struct ndctl_cmd *);
 	unsigned long long (*fw_info_get_run_version)(struct ndctl_cmd *);
-	unsigned long long (*fw_info_get_next_version)(struct ndctl_cmd *);
+	unsigned long long (*fw_info_get_updated_version)(struct ndctl_cmd *);
 	struct ndctl_cmd *(*new_fw_start_update)(struct ndctl_dimm *);
 	unsigned int (*fw_start_get_context)(struct ndctl_cmd *);
 	struct ndctl_cmd *(*new_fw_send)(struct ndctl_cmd *,
ndctl/libndctl.h +1 -1
index 10b423f..498ae19 100644
@@ -640,7 +640,7 @@ unsigned int ndctl_cmd_fw_info_get_max_send_len(struct ndctl_cmd *cmd);
 unsigned int ndctl_cmd_fw_info_get_query_interval(struct ndctl_cmd *cmd);
 unsigned int ndctl_cmd_fw_info_get_max_query_time(struct ndctl_cmd *cmd);
 unsigned long long ndctl_cmd_fw_info_get_run_version(struct ndctl_cmd *cmd);
-unsigned long long ndctl_cmd_fw_info_get_next_version(struct ndctl_cmd *cmd);
+unsigned long long ndctl_cmd_fw_info_get_updated_version(struct ndctl_cmd *cmd);
 unsigned int ndctl_cmd_fw_start_get_context(struct ndctl_cmd *cmd);
 unsigned long long ndctl_cmd_fw_fquery_get_fw_rev(struct ndctl_cmd *cmd);
 enum ND_FW_STATUS ndctl_cmd_fw_xlat_firmware_status(struct ndctl_cmd *cmd);
ndctl/util/json-firmware.c +0 -0
index e595e2f..118424f 100644

ndctl/util/json-firmware.c struct json_object *util_dimm_firmware_to_json(struct ndctl_dimm *dimm, · line 52

Quoted 8 lines
ndctl/util/json-firmware.c +1 -1
@@ -46,7 +46,7 @@ struct json_object *util_dimm_firmware_to_json(struct ndctl_dimm *dimm,
 	if (jobj)
 		json_object_object_add(jfirmware, "current_version", jobj);
 
-	next = ndctl_cmd_fw_info_get_next_version(cmd);
+	next = ndctl_cmd_fw_info_get_updated_version(cmd);
 	if (next == ULLONG_MAX) {
 		jobj = util_json_object_hex(-1, flags);
 		if (jobj)

_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm