Skip to content

Commit

Permalink
RDMA/amso1100: Fix build with debugging off
Browse files Browse the repository at this point in the history
Since pr_debug() has changed from a macro to an inline function when
DEBUG is not defined, its arguments now need to be defined even when
debugging is off.  Therefore to_event_str() and to_qp_state_str() need
to be moved out of #ifdef DEBUG.  The compiler will throw the
definitions away if DEBUG is not defined, but it needs to be able to
see that the functions exist.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
  • Loading branch information
Roland Dreier committed Oct 10, 2006
1 parent 82a9c16 commit 1031bfb
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/infiniband/hw/amso1100/c2_ae.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ static int c2_convert_cm_status(u32 c2_status)
}
}

#ifdef DEBUG
static const char* to_event_str(int event)
{
static const char* event_str[] = {
Expand Down Expand Up @@ -144,7 +143,6 @@ static const char *to_qp_state_str(int state)
return "<invalid QP state>";
};
}
#endif

void c2_ae_event(struct c2_dev *c2dev, u32 mq_index)
{
Expand Down

0 comments on commit 1031bfb

Please sign in to comment.