net: sctp: Don't use 64 kilobyte lookup table for four elements
authorDenys Vlasenko <dvlasenk@redhat.com>
Mon, 28 Sep 2015 12:34:04 +0000 (14:34 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 29 Sep 2015 05:52:21 +0000 (22:52 -0700)
commit2103d6b818fcdae15ffa04cf385f770e6c3892c3
tree090a856639c742e94a8553f853a36e821b40fe30
parent06a15f51cf3618e32a73871ee6a547ef7fd902b5
net: sctp: Don't use 64 kilobyte lookup table for four elements

Seemingly innocuous sctp_trans_state_to_prio_map[] array
is way bigger than it looks, since
"[SCTP_UNKNOWN] = 2" expands into "[0xffff] = 2" !

This patch replaces it with switch() statement.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
CC: Vlad Yasevich <vyasevich@gmail.com>
CC: Neil Horman <nhorman@tuxdriver.com>
CC: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
CC: linux-sctp@vger.kernel.org
CC: netdev@vger.kernel.org
CC: linux-kernel@vger.kernel.org
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/associola.c