]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitd26420af7c093070d953933a3420e4118b300e68
tree090a856639c742e94a8553f853a36e821b40fe30
parentac4d6279b551c895dacdf51fcf529e64909910da
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