@@ -1133,8 +1133,9 @@ static void sctp_cmd_send_asconf(struct sctp_association *asoc)
* functionality there.
*/
#define debug_pre_sfn() \
- pr_debug("%s[pre-fn]: ep:%p, %s, %s, asoc:%p[%s], %s\n", __func__, \
- ep, sctp_evttype_tbl[event_type], (*debug_fn)(subtype), \
+ pr_debug("%s[pre-fn]: ep:%p, %s, %s, asoc:%p[%s], %s\n", \
+ __func__, ep, sctp_evttype_tbl[event_type], \
+ (*table[event_type])(subtype), \
asoc, sctp_state_tbl[state], state_fn->name)
#define debug_post_sfn() \
@@ -1157,11 +1158,9 @@ int sctp_do_sm(struct net *net, enum sctp_event event_type,
struct sctp_endpoint *ep, struct sctp_association *asoc,
void *event_arg, gfp_t gfp)
{
- typedef const char *(printfn_t)(union sctp_subtype);
- static printfn_t *table[] = {
+ static const char *(*table[])(union sctp_subtype) = {
NULL, sctp_cname, sctp_tname, sctp_oname, sctp_pname,
};
- printfn_t *debug_fn __attribute__ ((unused)) = table[event_type];
const struct sctp_sm_table_entry *state_fn;
struct sctp_cmd_seq commands;
enum sctp_disposition status;