From patchwork Mon Apr 23 16:59:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Verma, Vishal L" X-Patchwork-Id: 10357637 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 38A3760225 for ; Mon, 23 Apr 2018 17:00:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2633828BCB for ; Mon, 23 Apr 2018 17:00:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1817D28BCD; Mon, 23 Apr 2018 17:00:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6325028BCB for ; Mon, 23 Apr 2018 17:00:05 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id D5F2322839313; Mon, 23 Apr 2018 10:00:04 -0700 (PDT) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.65; helo=mga03.intel.com; envelope-from=vishal.l.verma@intel.com; receiver=linux-nvdimm@lists.01.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id B1E372265A17A for ; Mon, 23 Apr 2018 10:00:03 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Apr 2018 10:00:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,318,1520924400"; d="scan'208";a="222687521" Received: from vverma7-mobl4.lm.intel.com ([10.252.138.182]) by fmsmga006.fm.intel.com with ESMTP; 23 Apr 2018 10:00:01 -0700 From: Vishal Verma To: Subject: [ndctl PATCH] ndctl: fix ABI breakage due to rename of fw_info_get_updated_version Date: Mon, 23 Apr 2018 10:59:55 -0600 Message-Id: <20180423165955.10262-1-vishal.l.verma@intel.com> X-Mailer: git-send-email 2.14.3 X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP 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 Cc: Dan Williams Signed-off-by: Vishal Verma Reviewed-by: Dave Jiang --- 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(-) diff --git a/ndctl/lib/firmware.c b/ndctl/lib/firmware.c index 277b539..a5dd006 100644 --- a/ndctl/lib/firmware.c +++ b/ndctl/lib/firmware.c @@ -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) diff --git a/ndctl/lib/intel.c b/ndctl/lib/intel.c index ba210e1..49a4360 100644 --- a/ndctl/lib/intel.c +++ b/ndctl/lib/intel.c @@ -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, diff --git a/ndctl/lib/libndctl.sym b/ndctl/lib/libndctl.sym index df17c3e..65e735f 100644 --- a/ndctl/lib/libndctl.sym +++ b/ndctl/lib/libndctl.sym @@ -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; diff --git a/ndctl/lib/private.h b/ndctl/lib/private.h index 1cad06b..73bbeed 100644 --- a/ndctl/lib/private.h +++ b/ndctl/lib/private.h @@ -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 *, diff --git a/ndctl/libndctl.h b/ndctl/libndctl.h index 10b423f..498ae19 100644 --- a/ndctl/libndctl.h +++ b/ndctl/libndctl.h @@ -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); diff --git a/ndctl/util/json-firmware.c b/ndctl/util/json-firmware.c index e595e2f..118424f 100644 --- a/ndctl/util/json-firmware.c +++ b/ndctl/util/json-firmware.c @@ -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)