Commit f036047f authored by Adam Wujek's avatar Adam Wujek

proto-ext-whiterabbit: optimize error message

Use the same string in the modified cases.
This saves ~200B on wrpc
Signed-off-by: 's avatarAdam Wujek <adam.wujek@creotech.pl>
parent 2200f98d
......@@ -40,7 +40,7 @@ int wr_calibrated(struct pp_instance *ppi, void *buf, int len, int new_state)
(wrp->wrMode == WR_SLAVE)) {
wrp->next_state = WRS_WR_LINK_ON;
} else {
pp_diag(ppi, ext, 1, "WR: Invalid msgId(x%04x) received. CALIBRATE/WR_MODE_ON was expected\n",wrMsgId);
pp_diag(ppi, ext, 1, "WR: Invalid msgId(x%04x) received. %s was expected\n", wrMsgId, "CALIBRATE/WR_MODE_ON");
wr_handshake_fail(ppi);
}
return 0;
......
......@@ -34,7 +34,7 @@ int wr_locked(struct pp_instance *ppi, void *buf, int len, int new_state)
if ( wrMsgId == CALIBRATE ) {
wrp->next_state= WRS_RESP_CALIB_REQ;
} else {
pp_diag(ppi, ext, 1, "WR: Invalid msgId(x%04x) received. CALIBRATE was expected\n",wrMsgId);
pp_diag(ppi, ext, 1, "WR: Invalid msgId(x%04x) received. %s was expected\n",wrMsgId, "CALIBRATE");
wr_handshake_fail(ppi);
}
return 0;
......
......@@ -34,7 +34,7 @@ int wr_m_lock(struct pp_instance *ppi, void *buf, int len, int new_state)
if (wrMsgId == LOCKED) {
wrp->next_state = WRS_CALIBRATION;
} else {
pp_diag(ppi, ext, 1, "WR: Invalid msgId(x%04x) received. LOCKED was expected\n",wrMsgId);
pp_diag(ppi, ext, 1, "WR: Invalid msgId(x%04x) received. %s was expected\n",wrMsgId, "LOCKED");
wr_handshake_fail(ppi);
}
return 0;
......
......@@ -36,7 +36,7 @@ int wr_present(struct pp_instance *ppi, void *buf, int len, int new_state)
if ( wrMsgId == LOCK ) {
wrp->next_state = WRS_S_LOCK;
} else {
pp_diag(ppi, ext, 1, "WR: Invalid msgId(x%04x) received. LOCK was expected\n",wrMsgId);
pp_diag(ppi, ext, 1, "WR: Invalid msgId(x%04x) received. %s was expected\n",wrMsgId, "LOCK");
wr_handshake_fail(ppi);
}
return 0;
......
......@@ -36,7 +36,7 @@ int wr_resp_calib_req(struct pp_instance *ppi, void *buf, int len, int new_state
WRS_WR_LINK_ON :
WRS_CALIBRATION;
} else {
pp_diag(ppi, ext, 1, "WR: Invalid msgId(x%04x) received. CALIBRATED was expected\n",wrMsgId);
pp_diag(ppi, ext, 1, "WR: Invalid msgId(x%04x) received. %s was expected\n",wrMsgId, "CALIBRATED");
wr_handshake_fail(ppi);
}
return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment