lkml.org 
[lkml]   [2020]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] usb-storage: Use const to reduce object data size
On Fri, 14 Feb 2020, Joe Perches wrote:

> Make structs const to reduce data size ~20KB.
>
> Change function arguments and prototypes as necessary to compile.
>
> $ size (x86-64 defconfig pre)
> text data bss dec hex filename
> 12281 10948 480 23709 5c9d ./drivers/usb/storage/usb.o
> 111 10528 8 10647 2997 ./drivers/usb/storage/usual-tables.o
>
> $ size (x86-64 defconfig post)
> text data bss dec hex filename
> 22809 420 480 23709 5c9d drivers/usb/storage/usb.o
> 10551 0 0 10551 2937 drivers/usb/storage/usual-tables.o
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>
> compile tested only
>
> drivers/usb/storage/usb.c | 10 +++++-----
> drivers/usb/storage/usb.h | 5 +++--
> drivers/usb/storage/usual-tables.c | 6 +++---
> include/linux/usb_usual.h | 2 +-
> 4 files changed, 12 insertions(+), 11 deletions(-)

It all looks quite reasonable.

Acked-by: Alan Stern <stern@rowland.harvard.edu>

Alan Stern

\
 
 \ /
  Last update: 2020-02-14 23:03    [W:0.059 / U:4.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site