[PATCH] USB: mark various usb tables const
patch below marks various USB tables and variables as const so that they end up in .rodata section and don't cacheline share with things that get written to. For the non-array variables it also allows gcc to optimize more. Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
9fe6fcd8cc
commit
4c4c9432a6
@@ -658,7 +658,7 @@ static int acm_tty_ioctl(struct tty_struct *tty, struct file *file, unsigned int
|
||||
return -ENOIOCTLCMD;
|
||||
}
|
||||
|
||||
static __u32 acm_tty_speed[] = {
|
||||
static const __u32 acm_tty_speed[] = {
|
||||
0, 50, 75, 110, 134, 150, 200, 300, 600,
|
||||
1200, 1800, 2400, 4800, 9600, 19200, 38400,
|
||||
57600, 115200, 230400, 460800, 500000, 576000,
|
||||
@@ -666,7 +666,7 @@ static __u32 acm_tty_speed[] = {
|
||||
2500000, 3000000, 3500000, 4000000
|
||||
};
|
||||
|
||||
static __u8 acm_tty_size[] = {
|
||||
static const __u8 acm_tty_size[] = {
|
||||
5, 6, 7, 8
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user