]> git.baikalelectronics.ru Git - kernel.git/commit
libata-eh: Use switch() instead of sparse array for protocol strings
authorGeert Uytterhoeven <geert@linux-m68k.org>
Mon, 9 Jan 2017 14:49:28 +0000 (15:49 +0100)
committerTejun Heo <tj@kernel.org>
Mon, 9 Jan 2017 15:22:21 +0000 (10:22 -0500)
commit32d5c5b64daf4c5859e799f27f83e9c7e43579a1
tree71b91db01fb9ced140ba02de61ed3f0a7ec28038
parentf31aebb141d7653a97cc55fbb7af80b0d6e776e0
libata-eh: Use switch() instead of sparse array for protocol strings

Replace the sparse 256-pointer array for looking up protocol strings by
a switch() statement to reduce kernel size.

According to bloat-o-meter, this saves 910 bytes on m68k (32-bit), and
1892 bytes on arm64 (64-bit).

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
drivers/ata/libata-eh.c