From patchwork Thu Jan 24 23:11:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Han Zhou X-Patchwork-Id: 1030708 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="LXZUpWn1"; dkim-atps=neutral Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43lybw513rz9s9h for ; Fri, 25 Jan 2019 10:12:28 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id B9A47D09; Thu, 24 Jan 2019 23:11:58 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 9E0FCCCE for ; Thu, 24 Jan 2019 23:11:56 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id BD2C7852 for ; Thu, 24 Jan 2019 23:11:55 +0000 (UTC) Received: by mail-wr1-f67.google.com with SMTP id q18so8312696wrx.9 for ; Thu, 24 Jan 2019 15:11:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+QdqDTdxSg0xYB6PM4BzOR5RraeKPO61i5N2bWK7HiQ=; b=LXZUpWn1U+Ia3Nlap6JFS5zek5T+PGSTeEvg3dDKLzbVkkBohn2FLGIMz9aFQkwIXW lJrEdqzYbKU0lMLLQ2VMvVo86rE1dpRU33THIhmokuXXoHbPywtAaGW/JGgUNyjdkXPr lkFOQzy+3HYXLenYcMB8djALwDxUi8yiCMKkEUwyR0mQYu1XPP74DLCzKICQys8eeMuX 6cPK5Ff7kzOkBNlM4g4ZE65Eq+wF7wP0JyQq55vSDUShaw+rAjKhKWw+vSlYLOqJSq/V jvuLRnIi7YU6hOpkSAHPX7efWFHDWS9+cRoL7JYzm5N2b6oaPHLj1LqREkInto24lJ4y VLPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=+QdqDTdxSg0xYB6PM4BzOR5RraeKPO61i5N2bWK7HiQ=; b=YSs+JnGBbdn3QFz0tk8HP7/5eC0hrNNM7ewiJv7HGW6HfsQxMpTQ8mvQrZV33VAB/B +8JY85/8vWyRz4FbG7BHcckItEUBnVOzLd/Zd7mKip9oO0m/d8eLd9vD2tGhy4/+cH2t plP5g/7wj5W4vsGs4QDKNbhcrdpUUtW2GXqlwF3rFDX9lFudAYTeewfMw/o5LQPScE+J Cqz+xOXT13J3cmeQ+7s3fYjF1eDACavr26NSRBGL2v5dsO/Hz4eoKiGkdSWHlB8+96fF rCyaq+lBlXdwtSWr9+C3uE5frBUeB0BRlPxJh/7urstnfeYtlely7kdl9gZ92TMcJ+oC QjRg== X-Gm-Message-State: AJcUukeNULlzuKDFHNCoV152RM7kzG09A5kOWuA2y73bTOikmpnvSp7k sjRR8EzsFD33ZBIlyxcl9gTYjpL4 X-Google-Smtp-Source: ALg8bN5go05lQv6agmgBL0AJbzmRJQR2gZKDYN8B9Z51oE/KuRIr80qba1N4I9acGYNJbWWSDCAryg== X-Received: by 2002:adf:9c8a:: with SMTP id d10mr8712603wre.244.1548371514008; Thu, 24 Jan 2019 15:11:54 -0800 (PST) Received: from localhost.localdomain.localdomain ([216.113.160.71]) by smtp.gmail.com with ESMTPSA id h62sm46719335wmf.11.2019.01.24.15.11.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Jan 2019 15:11:53 -0800 (PST) From: Han Zhou X-Google-Original-From: Han Zhou To: dev@openvswitch.org Date: Thu, 24 Jan 2019 15:11:16 -0800 Message-Id: <1548371481-109219-3-git-send-email-hzhou8@ebay.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1548371481-109219-1-git-send-email-hzhou8@ebay.com> References: <1548371481-109219-1-git-send-email-hzhou8@ebay.com> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [RFC 2/7] ovsdb_monitor: Fix style of prototypes. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org From: Han Zhou Ommiting the parameter names in prototypes, as suggested by coding style: Omit parameter names from function prototypes when the names do not give useful information. Adjust orders of parameters as suggested by coding style. Signed-off-by: Han Zhou --- ovsdb/jsonrpc-server.c | 4 +-- ovsdb/monitor.c | 14 +++++------ ovsdb/monitor.h | 66 +++++++++++++++++++++++++------------------------- 3 files changed, 42 insertions(+), 42 deletions(-) diff --git a/ovsdb/jsonrpc-server.c b/ovsdb/jsonrpc-server.c index 7c7a277..77f15d9 100644 --- a/ovsdb/jsonrpc-server.c +++ b/ovsdb/jsonrpc-server.c @@ -1578,7 +1578,7 @@ ovsdb_jsonrpc_monitor_cond_change(struct ovsdb_jsonrpc_session *s, struct json *update_json; update_json = ovsdb_monitor_get_update(m->dbmon, false, true, - &m->unflushed, m->condition, m->version); + m->condition, m->version, &m->unflushed); if (update_json) { struct jsonrpc_msg *msg; struct json *p; @@ -1653,7 +1653,7 @@ ovsdb_jsonrpc_monitor_compose_update(struct ovsdb_jsonrpc_monitor *m, } return ovsdb_monitor_get_update(m->dbmon, initial, false, - &m->unflushed, m->condition, m->version); + m->condition, m->version, &m->unflushed); } static bool diff --git a/ovsdb/monitor.c b/ovsdb/monitor.c index dd06e26..bf130ad 100644 --- a/ovsdb/monitor.c +++ b/ovsdb/monitor.c @@ -158,14 +158,14 @@ typedef struct json * const void *, bool initial, unsigned long int *changed); -static void ovsdb_monitor_destroy(struct ovsdb_monitor *dbmon); +static void ovsdb_monitor_destroy(struct ovsdb_monitor *); static struct ovsdb_monitor_changes * ovsdb_monitor_table_add_changes( - struct ovsdb_monitor_table *mt, uint64_t next_txn); + struct ovsdb_monitor_table *, uint64_t next_txn); static struct ovsdb_monitor_changes *ovsdb_monitor_table_find_changes( - struct ovsdb_monitor_table *mt, uint64_t unflushed); + struct ovsdb_monitor_table *, uint64_t unflushed); static void ovsdb_monitor_changes_destroy( - struct ovsdb_monitor_changes *changes); -static void ovsdb_monitor_table_track_changes(struct ovsdb_monitor_table *mt, + struct ovsdb_monitor_changes *); +static void ovsdb_monitor_table_track_changes(struct ovsdb_monitor_table *, uint64_t unflushed); static uint32_t @@ -1103,9 +1103,9 @@ struct json * ovsdb_monitor_get_update( struct ovsdb_monitor *dbmon, bool initial, bool cond_updated, - uint64_t *unflushed_, struct ovsdb_monitor_session_condition *condition, - enum ovsdb_monitor_version version) + enum ovsdb_monitor_version version, + uint64_t *unflushed_) { struct ovsdb_monitor_json_cache_node *cache_node = NULL; struct shash_node *node; diff --git a/ovsdb/monitor.h b/ovsdb/monitor.h index eb3ff27..9bc0613 100644 --- a/ovsdb/monitor.h +++ b/ovsdb/monitor.h @@ -44,73 +44,73 @@ enum ovsdb_monitor_version { OVSDB_MONITOR_VERSION_MAX }; -struct ovsdb_monitor *ovsdb_monitor_create(struct ovsdb *db, - struct ovsdb_jsonrpc_monitor *jsonrpc_monitor); +struct ovsdb_monitor *ovsdb_monitor_create(struct ovsdb *, + struct ovsdb_jsonrpc_monitor *); void ovsdb_monitors_remove(struct ovsdb *); void ovsdb_monitors_commit(struct ovsdb *, const struct ovsdb_txn *); void ovsdb_monitor_prereplace_db(struct ovsdb *); -struct ovsdb_monitor *ovsdb_monitor_add(struct ovsdb_monitor *dbmon); +struct ovsdb_monitor *ovsdb_monitor_add(struct ovsdb_monitor *); -void ovsdb_monitor_add_jsonrpc_monitor(struct ovsdb_monitor *dbmon, - struct ovsdb_jsonrpc_monitor *jsonrpc_monitor); +void ovsdb_monitor_add_jsonrpc_monitor(struct ovsdb_monitor *, + struct ovsdb_jsonrpc_monitor *); -void ovsdb_monitor_remove_jsonrpc_monitor(struct ovsdb_monitor *dbmon, - struct ovsdb_jsonrpc_monitor *jsonrpc_monitor, +void ovsdb_monitor_remove_jsonrpc_monitor(struct ovsdb_monitor *, + struct ovsdb_jsonrpc_monitor *, uint64_t unflushed); -void ovsdb_monitor_add_table(struct ovsdb_monitor *m, - const struct ovsdb_table *table); +void ovsdb_monitor_add_table(struct ovsdb_monitor *, + const struct ovsdb_table *); -const char * ovsdb_monitor_add_column(struct ovsdb_monitor *dbmon, - const struct ovsdb_table *table, - const struct ovsdb_column *column, - enum ovsdb_monitor_selection select, +const char * ovsdb_monitor_add_column(struct ovsdb_monitor *, + const struct ovsdb_table *, + const struct ovsdb_column *, + enum ovsdb_monitor_selection, bool monitored); bool -ovsdb_monitor_table_exists(struct ovsdb_monitor *m, - const struct ovsdb_table *table); +ovsdb_monitor_table_exists(struct ovsdb_monitor *, + const struct ovsdb_table *); -struct json *ovsdb_monitor_get_update(struct ovsdb_monitor *dbmon, +struct json *ovsdb_monitor_get_update(struct ovsdb_monitor *, bool initial, bool cond_updated, - uint64_t *unflushed_transaction, - struct ovsdb_monitor_session_condition *condition, - enum ovsdb_monitor_version version); + struct ovsdb_monitor_session_condition *, + enum ovsdb_monitor_version, + uint64_t *unflushed_transaction); -void ovsdb_monitor_table_add_select(struct ovsdb_monitor *dbmon, - const struct ovsdb_table *table, - enum ovsdb_monitor_selection select); +void ovsdb_monitor_table_add_select(struct ovsdb_monitor *, + const struct ovsdb_table *, + enum ovsdb_monitor_selection); -bool ovsdb_monitor_needs_flush(struct ovsdb_monitor *dbmon, +bool ovsdb_monitor_needs_flush(struct ovsdb_monitor *, uint64_t next_transaction); -void ovsdb_monitor_get_initial(const struct ovsdb_monitor *dbmon); +void ovsdb_monitor_get_initial(const struct ovsdb_monitor *); -void ovsdb_monitor_get_memory_usage(struct simap *usage); +void ovsdb_monitor_get_memory_usage(struct simap *); struct ovsdb_monitor_session_condition * ovsdb_monitor_session_condition_create(void); void ovsdb_monitor_session_condition_destroy( - struct ovsdb_monitor_session_condition *condition); + struct ovsdb_monitor_session_condition *); struct ovsdb_error * ovsdb_monitor_table_condition_create( - struct ovsdb_monitor_session_condition *condition, - const struct ovsdb_table *table, + struct ovsdb_monitor_session_condition *, + const struct ovsdb_table *, const struct json *json_cnd); void -ovsdb_monitor_condition_bind(struct ovsdb_monitor *dbmon, - struct ovsdb_monitor_session_condition *cond); +ovsdb_monitor_condition_bind(struct ovsdb_monitor *, + struct ovsdb_monitor_session_condition *); struct ovsdb_error * ovsdb_monitor_table_condition_update( - struct ovsdb_monitor *dbmon, - struct ovsdb_monitor_session_condition *condition, - const struct ovsdb_table *table, + struct ovsdb_monitor *, + struct ovsdb_monitor_session_condition *, + const struct ovsdb_table *, const struct json *cond_json); #endif