On Mon, 2019-01-07 at 22:41 +0800, John Garry wrote:
> Currently the protection lookup tables in sd_prot_flag_mask() and
> sd_prot_op() are declared non-static. As such, they will be rebuilt for
> each respective function call.
> 
> Optimise by making them static.
> 
> This saves ~100B object code for sd.c:
> 
> Before:
>    text          data     bss     dec     hex filename
>   25403          1024      16   26443    674b drivers/scsi/sd.o
> 
> After:
>   text           data     bss     dec     hex filename
>   25299          1024      16   26339    66e3 drivers/scsi/sd.o

Since the sd_prot_op() function only has a single caller, please move it from 
sd.h
into sd.c.

Thanks,

Bart.

Reply via email to