From patchwork Tue Jan 12 20:34:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Zhou X-Patchwork-Id: 566735 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (li376-54.members.linode.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 81465140307 for ; Wed, 13 Jan 2016 07:36:52 +1100 (AEDT) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 7934410A12; Tue, 12 Jan 2016 12:36:51 -0800 (PST) X-Original-To: dev@openvswitch.com Delivered-To: dev@openvswitch.com Received: from mail-pa0-f47.google.com (mail-pa0-f47.google.com [209.85.220.47]) by archives.nicira.com (Postfix) with ESMTPS id 971AF10A11 for ; Tue, 12 Jan 2016 12:36:50 -0800 (PST) Received: by mail-pa0-f47.google.com with SMTP id uo6so328919720pac.1 for ; Tue, 12 Jan 2016 12:36:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=from:to:cc:subject:date:message-id; bh=KFRBxxOc+eEgoEU8ki4g5kuecAYlPW8UvcGGgsS68/E=; b=ASSflcoLj6xzracVhYDRxvZDHW2zngVlXkRVyekV0f1C5LpyEG7haXGX8/iXhhZSIY ghw08atf7mE0l8xycHUDvcd2yHG6NUa6a1KJoklh0SOR16+yYbt7fJob/W2Amo1UGifA PG6vCmM6n7J4JeOg3XsyAUu3y2jOdFqFbkVmGwJDrpjzc/P9zEyXRPp+38QGtsIYDoAR 96Rf1IMvvdsNsjxvLC9tBlz9WF0BscU88TkzdUZNFcaKkqMP02cqgdZwv6aXTh0TjVxt /WDKyeT732A1OqiPv7f/4+kGVkYBzz4B5ue6l2jpHU0VwVwpu5+5rQqEPuSjLOx0sMUl S7sQ== X-Received: by 10.66.100.135 with SMTP id ey7mr194539251pab.108.1452631009739; Tue, 12 Jan 2016 12:36:49 -0800 (PST) Received: from localhost.localdomain ([208.91.2.3]) by smtp.gmail.com with ESMTPSA id 68sm32311960pfa.78.2016.01.12.12.36.48 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 12 Jan 2016 12:36:48 -0800 (PST) From: Andy Zhou To: dev@openvswitch.com Date: Tue, 12 Jan 2016 12:34:58 -0800 Message-Id: <1452630898-32385-1-git-send-email-azhou@ovn.org> X-Mailer: git-send-email 1.9.1 Subject: [ovs-dev] [PATCH] lib: remove unused function X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" Remove unused implementation of ovsdb_idl_row_apply_diff(). Reported-by: Ben Pfaff Signed-off-by: Andy Zhou Acked-by: Ben Pfaff --- lib/ovsdb-idl.c | 57 --------------------------------------------------------- 1 file changed, 57 deletions(-) diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c index a3dfcb9..7e84138 100644 --- a/lib/ovsdb-idl.c +++ b/lib/ovsdb-idl.c @@ -1279,63 +1279,6 @@ ovsdb_idl_process_update2(struct ovsdb_idl_table *table, return true; } -#if 0 -ovsdb_idl_row_apply_diff(struct ovsdb_idl_row *row, - const struct json *diff_json) -{ - struct ovsdb_idl_table *table = row->table; - const struct ovsdb_idl_table_class *class = table->class; - struct shash_node *node; - bool changed = false; - - SHASH_FOR_EACH (node, json_object(diff_json)) { - const char *column_name = node->name; - const struct ovsdb_idl_column *column; - struct ovsdb_datum diff; - struct ovsdb_error *error; - - column = shash_find_data(&table->columns, column_name); - if (!column) { - VLOG_WARN_RL(&syntax_rl, "unknown column %s updating row "UUID_FMT, - column_name, UUID_ARGS(&row->uuid)); - continue; - } - - error = ovsdb_transient_datum_from_json(&diff, &column->type, - node->data); - if (!error) { - unsigned int column_idx = column - table->class->columns; - struct ovsdb_datum *old = &row->old[column_idx]; - struct ovsdb_datum new; - struct ovsdb_error *error; - - error = ovsdb_datum_apply_diff(&new, old, &diff, &column->type); - if (error) { - VLOG_WARN_RL(&syntax_rl, "update2 failed to modify column " - "%s row "UUID_FMT, column_name, - UUID_ARGS(&row->uuid)); - ovsdb_error_destroy(error); - } else { - ovsdb_datum_swap(old, &new); - ovsdb_datum_destroy(&new, &column->type); - if (table->modes[column_idx] & OVSDB_IDL_ALERT) { - changed = true; - } - } - ovsdb_datum_destroy(&diff, &column->type); - } else { - char *s = ovsdb_error_to_string(error); - VLOG_WARN_RL(&syntax_rl, "error parsing column %s in row "UUID_FMT - " in table %s: %s", column_name, - UUID_ARGS(&row->uuid), table->class->name, s); - free(s); - ovsdb_error_destroy(error); - } - } - return changed; -} -#endif - /* Returns true if a column with mode OVSDB_IDL_MODE_RW changed, false * otherwise. *