From a727db8874357b128a289f381b84fd0d71b8a4c7 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 8 Jan 2009 15:23:50 -0800 Subject: [PATCH] Remove unused function parameter from stp_start(). Found by -Wunused-parameter. --- secchan/stp-secchan.c | 3 +-- secchan/stp-secchan.h | 6 ++---- udatapath/datapath.c | 28 +++++++++++++--------------- 3 files changed, 16 insertions(+), 21 deletions(-) diff --git a/secchan/stp-secchan.c b/secchan/stp-secchan.c index 9ded73b6..a3ce5c73 100644 --- a/secchan/stp-secchan.c +++ b/secchan/stp-secchan.c @@ -272,8 +272,7 @@ static struct hook_class stp_hook_class = { }; void -stp_start(struct secchan *secchan, const struct settings *s, - struct port_watcher *pw, +stp_start(struct secchan *secchan, struct port_watcher *pw, struct rconn *local, struct rconn *remote) { uint8_t dpid[ETH_ADDR_LEN]; diff --git a/secchan/stp-secchan.h b/secchan/stp-secchan.h index ac4076f4..2d1105f7 100644 --- a/secchan/stp-secchan.h +++ b/secchan/stp-secchan.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008 The Board of Trustees of The Leland Stanford +/* Copyright (c) 2008, 2009 The Board of Trustees of The Leland Stanford * Junior University * * We are making the OpenFlow specification and associated documentation @@ -41,10 +41,8 @@ struct port_watcher; struct rconn; struct secchan; -struct settings; -void stp_start(struct secchan *, const struct settings *, - struct port_watcher *, +void stp_start(struct secchan *, struct port_watcher *, struct rconn *local, struct rconn *remote); #endif /* stp-secchan.h */ diff --git a/udatapath/datapath.c b/udatapath/datapath.c index aee71ee5..e8400459 100644 --- a/udatapath/datapath.c +++ b/udatapath/datapath.c @@ -688,8 +688,8 @@ dp_output_control(struct datapath *dp, struct ofpbuf *buffer, int in_port, send_openflow_buffer(dp, buffer, NULL); } -static void fill_port_desc(struct datapath *dp, struct sw_port *p, - struct ofp_phy_port *desc) +static void +fill_port_desc(struct sw_port *p, struct ofp_phy_port *desc) { desc->port_no = htons(p->port_no); strncpy((char *) desc->name, netdev_get_name(p->netdev), @@ -723,7 +723,7 @@ dp_send_features_reply(struct datapath *dp, const struct sender *sender) LIST_FOR_EACH (p, struct sw_port, node, &dp->port_list) { struct ofp_phy_port *opp = ofpbuf_put_uninit(buffer, sizeof *opp); memset(opp, 0, sizeof *opp); - fill_port_desc(dp, p, opp); + fill_port_desc(p, opp); } send_openflow_buffer(dp, buffer, sender); } @@ -793,7 +793,7 @@ send_port_status(struct sw_port *p, uint8_t status) ops = make_openflow_xid(sizeof *ops, OFPT_PORT_STATUS, 0, &buffer); ops->reason = status; memset(ops->pad, 0, sizeof ops->pad); - fill_port_desc(p->dp, p, &ops->desc); + fill_port_desc(p, &ops->desc); send_openflow_buffer(p->dp, buffer, NULL); } @@ -1191,8 +1191,8 @@ struct flow_stats_state { #define MAX_FLOW_STATS_BYTES 4096 -static int flow_stats_init(struct datapath *dp, const void *body, int body_len, - void **state) +static int +flow_stats_init(const void *body, int body_len UNUSED, void **state) { const struct ofp_flow_stats_request *fsr = body; struct flow_stats_state *s = xmalloc(sizeof *s); @@ -1243,9 +1243,8 @@ struct aggregate_stats_state { struct ofp_aggregate_stats_request rq; }; -static int aggregate_stats_init(struct datapath *dp, - const void *body, int body_len, - void **state) +static int +aggregate_stats_init(const void *body, int body_len UNUSED, void **state) { const struct ofp_aggregate_stats_request *rq = body; struct aggregate_stats_state *s = xmalloc(sizeof *s); @@ -1329,8 +1328,8 @@ struct port_stats_state { int port; }; -static int port_stats_init(struct datapath *dp, const void *body, int body_len, - void **state) +static int +port_stats_init(const void *body UNUSED, int body_len UNUSED, void **state) { struct port_stats_state *s = xmalloc(sizeof *s); s->port = 0; @@ -1392,13 +1391,12 @@ struct stats_type { * struct ofp_stats_request. */ size_t min_body, max_body; - /* Prepares to dump some kind of statistics on 'dp'. 'body' and + /* Prepares to dump some kind of datapath statistics. 'body' and * 'body_len' are the 'body' member of the struct ofp_stats_request. * Returns zero if successful, otherwise a negative error code. * May initialize '*state' to state information. May be null if no * initialization is required.*/ - int (*init)(struct datapath *dp, const void *body, int body_len, - void **state); + int (*init)(const void *body, int body_len, void **state); /* Appends statistics for 'dp' to 'buffer', which initially contains a * struct ofp_stats_reply. On success, it should return 1 if it should be @@ -1548,7 +1546,7 @@ recv_stats_request(struct datapath *dp, const struct sender *sender, } if (cb->s->init) { - err = cb->s->init(dp, rq->body, body_len, &cb->state); + err = cb->s->init(rq->body, body_len, &cb->state); if (err) { VLOG_WARN_RL(&rl, "failed initialization of stats request type %d: %s", -- 2.30.2