mirror of https://github.com/ipxe/ipxe.git
[hermon] Make hermon_dump_xxx() functions no-ops on non-debug builds
Signed-off-by: Michael Brown <mcb30@ipxe.org>pull/228/head
parent
410566cef7
commit
8747241b3e
|
@ -823,6 +823,11 @@ hermon_dump_cqctx ( struct hermon *hermon, struct ib_completion_queue *cq ) {
|
||||||
struct hermonprm_completion_queue_context cqctx;
|
struct hermonprm_completion_queue_context cqctx;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
/* Do nothing unless debugging is enabled */
|
||||||
|
if ( ! DBG_LOG )
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
/* Dump completion queue context */
|
||||||
memset ( &cqctx, 0, sizeof ( cqctx ) );
|
memset ( &cqctx, 0, sizeof ( cqctx ) );
|
||||||
if ( ( rc = hermon_cmd_query_cq ( hermon, cq->cqn, &cqctx ) ) != 0 ) {
|
if ( ( rc = hermon_cmd_query_cq ( hermon, cq->cqn, &cqctx ) ) != 0 ) {
|
||||||
DBGC ( hermon, "Hermon %p CQN %#lx QUERY_CQ failed: %s\n",
|
DBGC ( hermon, "Hermon %p CQN %#lx QUERY_CQ failed: %s\n",
|
||||||
|
@ -1102,6 +1107,11 @@ hermon_dump_qpctx ( struct hermon *hermon, struct ib_queue_pair *qp ) {
|
||||||
struct hermonprm_qp_ee_state_transitions qpctx;
|
struct hermonprm_qp_ee_state_transitions qpctx;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
/* Do nothing unless debugging is enabled */
|
||||||
|
if ( ! DBG_LOG )
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
/* Dump queue pair context */
|
||||||
memset ( &qpctx, 0, sizeof ( qpctx ) );
|
memset ( &qpctx, 0, sizeof ( qpctx ) );
|
||||||
if ( ( rc = hermon_cmd_query_qp ( hermon, qp->qpn, &qpctx ) ) != 0 ) {
|
if ( ( rc = hermon_cmd_query_qp ( hermon, qp->qpn, &qpctx ) ) != 0 ) {
|
||||||
DBGC ( hermon, "Hermon %p QPN %#lx QUERY_QP failed: %s\n",
|
DBGC ( hermon, "Hermon %p QPN %#lx QUERY_QP failed: %s\n",
|
||||||
|
@ -1898,6 +1908,11 @@ hermon_dump_eqctx ( struct hermon *hermon,
|
||||||
struct hermonprm_eqc eqctx;
|
struct hermonprm_eqc eqctx;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
/* Do nothing unless debugging is enabled */
|
||||||
|
if ( ! DBG_LOG )
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
/* Dump event queue context */
|
||||||
memset ( &eqctx, 0, sizeof ( eqctx ) );
|
memset ( &eqctx, 0, sizeof ( eqctx ) );
|
||||||
if ( ( rc = hermon_cmd_query_eq ( hermon, hermon_eq->eqn,
|
if ( ( rc = hermon_cmd_query_eq ( hermon, hermon_eq->eqn,
|
||||||
&eqctx ) ) != 0 ) {
|
&eqctx ) ) != 0 ) {
|
||||||
|
@ -1930,6 +1945,11 @@ hermon_dump_eqes ( struct hermon *hermon,
|
||||||
unsigned int idx;
|
unsigned int idx;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
/* Do nothing unless debugging is enabled */
|
||||||
|
if ( ! DBG_LOG )
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
/* Dump event queue entries */
|
||||||
memset ( &eqctx, 0, sizeof ( eqctx ) );
|
memset ( &eqctx, 0, sizeof ( eqctx ) );
|
||||||
if ( ( rc = hermon_cmd_query_eq ( hermon, hermon_eq->eqn,
|
if ( ( rc = hermon_cmd_query_eq ( hermon, hermon_eq->eqn,
|
||||||
&eqctx ) ) != 0 ) {
|
&eqctx ) ) != 0 ) {
|
||||||
|
|
Loading…
Reference in New Issue