Commit 3c1b2c3ecd3122fe6dded7b012f74021144d95b2
Committed by
Greg Kroah-Hartman
1 parent
5d188d6df3
Exists in
master
and in
13 other branches
USB: sisusb: Use static const, fix typo
Convert 1 char * array to 2 char arrays to reduce size. Use static const to avoid array reloads on function entry. Fix asymmetric typo. $ size drivers/usb/misc/sisusbvga/sisusb.o* text data bss dec hex filename 29971 4841 9180 43992 abd8 drivers/usb/misc/sisusbvga/sisusb.o.new 30083 4841 9180 44104 ac48 drivers/usb/misc/sisusbvga/sisusb.o.old Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing 1 changed file with 6 additions and 4 deletions Side-by-side Diff
drivers/usb/misc/sisusbvga/sisusb.c
... | ... | @@ -2123,8 +2123,8 @@ |
2123 | 2123 | u8 tmp8, tmp82, ramtype; |
2124 | 2124 | int bw = 0; |
2125 | 2125 | char *ramtypetext1 = NULL; |
2126 | - const char *ramtypetext2[] = { "SDR SDRAM", "SDR SGRAM", | |
2127 | - "DDR SDRAM", "DDR SGRAM" }; | |
2126 | + static const char ram_datarate[4] = {'S', 'S', 'D', 'D'}; | |
2127 | + static const char ram_dynamictype[4] = {'D', 'G', 'D', 'G'}; | |
2128 | 2128 | static const int busSDR[4] = {64, 64, 128, 128}; |
2129 | 2129 | static const int busDDR[4] = {32, 32, 64, 64}; |
2130 | 2130 | static const int busDDRA[4] = {64+32, 64+32 , (64+32)*2, (64+32)*2}; |
... | ... | @@ -2156,8 +2156,10 @@ |
2156 | 2156 | break; |
2157 | 2157 | } |
2158 | 2158 | |
2159 | - dev_info(&sisusb->sisusb_dev->dev, "%dMB %s %s, bus width %d\n", (sisusb->vramsize >> 20), ramtypetext1, | |
2160 | - ramtypetext2[ramtype], bw); | |
2159 | + | |
2160 | + dev_info(&sisusb->sisusb_dev->dev, "%dMB %s %cDR S%cRAM, bus width %d\n", | |
2161 | + sisusb->vramsize >> 20, ramtypetext1, | |
2162 | + ram_datarate[ramtype], ram_dynamictype[ramtype], bw); | |
2161 | 2163 | } |
2162 | 2164 | |
2163 | 2165 | static int |