From ffbafa557ba91a18c320eb5035d471acc78fac09 Mon Sep 17 00:00:00 2001 From: Richard Cochran Date: Thu, 31 May 2018 22:53:13 -0700 Subject: [PATCH] transport: Fix even more callers to pass a proper enumeration value. All of the callers of transport_peer() use hard coded magic numbers. This patch fixes them to use the corresponding enumerated values instead. Signed-off-by: Richard Cochran --- port.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/port.c b/port.c index e4e09ce..67ae4d4 100644 --- a/port.c +++ b/port.c @@ -563,7 +563,7 @@ static int path_trace_ignore(struct port *p, struct ptp_message *m) } static int peer_prepare_and_send(struct port *p, struct ptp_message *msg, - int event) + enum transport_event event) { int cnt; if (msg_pre_send(msg)) { @@ -1230,7 +1230,7 @@ static int port_pdelay_request(struct port *p) msg->header.logMessageInterval = port_is_ieee8021as(p) ? p->logMinPdelayReqInterval : 0x7f; - err = peer_prepare_and_send(p, msg, 1); + err = peer_prepare_and_send(p, msg, TRANS_EVENT); if (err) { pr_err("port %hu: send peer delay request failed", portnum(p)); goto out; @@ -1873,7 +1873,8 @@ void process_follow_up(struct port *p, struct ptp_message *m) int process_pdelay_req(struct port *p, struct ptp_message *m) { struct ptp_message *rsp, *fup; - int err, event; + enum transport_event event; + int err; switch (p->timestamping) { case TS_SOFTWARE: @@ -1982,7 +1983,7 @@ int process_pdelay_req(struct port *p, struct ptp_message *m) fup->pdelay_resp_fup.responseOriginTimestamp = tmv_to_Timestamp(rsp->hwts.ts); - err = peer_prepare_and_send(p, fup, 0); + err = peer_prepare_and_send(p, fup, TRANS_GENERAL); if (err) { pr_err("port %hu: send pdelay_resp_fup failed", portnum(p)); }